Prophylaxis is a Greek word and concept. It means any action taken to guard or prevent beforehand. The corresponding adjective is prophylactic.
The concept of prophylaxis has two parts. First is forethought. A person has to realise the need first of all. Second is taking appropriate action.
Any failure of prophylaxis is a failure at either stage 1 or stage 2. Successful prophylaxis means one has anticipated and avoided some undesirable outcome.
Prophylaxis is the central idea in preventative medicine. People usually think medical treatment helps sick people to get healthy. Prophylactic treatment is helpful in a different way. Primary prophylaxis tries to stop healthy people from getting sick. Secondary prophylaxis tries to stop people who are sick from getting worse.
Prophylaxis is also be used as a synonym for birth control. Condoms are prophylactic, because when used properly they can prevent pregnancy or sexually transmitted diseases.