Binary search is a search algorithm that finds the position of a target value within a sorted array. It works by comparing the target value to the middle element of the array each time, eliminating half of the remaining elements from consideration based on whether the target is less than or greater than the middle element. This process continues, halving the search space each time, until the target is found or the search space is empty, indicating the target is not in the array. Binary search runs in logarithmic time, making it faster than the linear time complexity of linear search.