A microorganism is a living entity that is so small it can only be seen with the aid of a microscope.
A pathogen is an organism that causes disease. Examples of pathogens include bacteria, viruses, parasites, and fungi. Note that a pathogen does not have to be a microorganism; some parasitic worms cause disease and are pathogens but are large enough to be seen with the naked eye.
In addition, a microorganism is not necessarily a pathogen. Bacteria can only be seen with a microscope, but most bacteria do not cause disease.
All vaccines are targeted against pathogenic bacteria or viruses. We do not (yet) have any vaccines against fungi or parasites.