Pages that link here:
Pork pie hat is round hat known from 19th century, called that because of similarity with that time pork pie dish. The most popular were from 1830 through American Civil War, but in the 20th century, it was popularized again thanks to actor Buster Keaton, and, after that, thanks to jazz musicians such as Lester Young and Charles Mingus.
The baseball cap is a soft hat with a peak and traditionally was part of baseball uniform. This cap today even symbolizes American Culture. The first version was known as "Brooklyn style" cap. During the time the peak was longer - to protect eyes from the sun - so it's logical that today everyone wears it: truck drivers, tennis players, and police officers.
Famous bowler hat, symbol of working but also upper classes as well, a better cowboy hat than a cowboy hat started as a hard hat for gamekeepers. You can read more about history of bowler hats here.
The fez is a red short cylinder with a tassel on the top of it. It was popularized during Ottoman period, but still is an icon of Ottoman culture. Fez was used in the Middle East, Eastern Europe, and North Africa, so it's unclear where were its origins. It was a regular part of uniforms of many countries and today is mostly exotic fashion item and part of national costumes.