how to display categories for a specific post?

You can use single_cat_title function to get category’s name.

Useful for category template files for displaying the category page title. The prefix does not automatically place a space between the prefix, so if there should be a space, the parameter value will need to have it at the end.