K-fold cross validation

What is the primary purpose of using k-fold cross-validation?