Find the smallest value, swap it into place, and repeat on the rest.
This interactive visualization needs JavaScript.