What are bonds and how do they work?

What are bonds and how do they work?