Function Reference/get the category

Returns an array of objects, one object for each category assigned to the post. This tag may be used outside The Loop by passing a post id as the parameter.

This function only returns results from the default “category” taxonomy. For custom taxonomies use get_the_terms.

 

http://codex.wordpress.org/Function_Reference/get_the_category