What is SSH and how does it work?

What is SSH?