Selection sort is an in-place sorting algorithm that works by repeatedly finding the minimum element from unsorted part and putting it at the beginning. It maintains two subarrays, sorted subarray which is built up from left to right at the front of the array, and unsorted subarray to the right. In each iteration, the minimum element (considering ascending order) from the unsorted subarray is picked and moved to the next slot in the sorted subarray. This continues until the whole array is sorted. The time complexity of selection sort is O(n^2) as it requires n iterations and in each iteration it has to scan remaining unsorted elements to find the minimum.