What exactly is keratin in our hair and what is it good for?

What exactly is keratin in our hair and what is it good for?