Selection sort works by iteratively finding the minimum/maximum element from the unsorted portion of the list and placing it at the end/beginning of the sorted portion. It does this by scanning the unsorted portion to find the minimum/maximum element, swapping it with the element in the last position of the unsorted portion, and moving it to the sorted portion. This process is repeated until the entire list is sorted.