Simple, a shotgun mic is a microphone that has a directional pick-up pattern. The microphone itself is known as a shotgun microphone, due to the “shotgun” type of polar pattern. They can also have cardioid and super-cardioid polar patterns. They are the most common type of mic on a film or tv set.
A boom mic is any microphone that is at the end of a long, extended pole, also known as a “boom pole.” It doesn’t matter what type of microphone you use, if it’s on an extended pole, it is a boom mic. It is the technique of using the microphone, rather than the microphone itself. A boom pole is used to get the microphone in as close as possible to a subject, without getting in the camera shot. Most boom mics are used with shotgun mics.