Auto focusing Inputs Fields, Sound complicated? It isn't!

Basically I’m wondering how i can get an input field to be focused when the page loads. Like when you go to google the “search” field is focused and has the flashing pointer in it.

How do they do it?