Binary search is a searching algorithm that finds the position of a target value within a sorted array. It runs in logarithmic time, making O(log n) comparisons where n is the number of elements. The process starts by finding the middle element of the array and comparing it to the target. If they match, the position is returned. If the target is less than the middle element, the search continues in the lower half. If greater, the search continues in the upper half. This halves the search space at each step, resulting in a runtime that is logarithmic in the size of the array. Binary search is optimal for searching sorted data and widely used to search databases and solve equations.