Pawan Kumar interview question

How does a binary search algorithm work?