Vaccines can be singled out as a specific type of prophylaxis.
The distinction is that a vaccine will train your immune system to actively destroy the foreign body, while a prophylactics might just prevent it from spreading or taking hold to begin with.