Review this.
http://docs.splunk.com/Documentation/Splunk/6.0/Search/Usethesearchcommand
But to answer more completely, events are returned in latest to earliest (most recent to farthest back) order by default, and head 5 indicates you only want the first 5 events returned.
Sounds like you really need to take the basic Splunk tutorial.