Two casually-dressed men, one in a cowboy hat and one in a baseball cap, make their way through a crowd.
A man is wearing a cowboy hat.
Wearing a hat is the same as being in a hat.
"Wearing a cowboy hat" means the same as "in a cowboy hat."
man in a cowboy hat means he is wearing a cowboy hat