A quick guide
The way your immune defense works when you contract an illness, is that it will start producing anti-bodies to fight off whatever entered. But if it's something completely new it will have to start from zero. This is where vaccines come in handy. A vaccine will teach your immune system what stuff like yellow fever, tetanus or hepatitis look like, and start build up a pre-existing defense. This is why vaccines are thought of as preventive measures.
The lifespan of a vaccine vary from a mere season to a life-time. This depends on the vaccine, brand and number of injections.
The fact that preventive measures sometimes are your only option, is something I learned the scary way. I was bitten by a stray dog in Belgrade, and it wasn't until then I actually read up on required and recommended vaccines. I mistakenly figured "hey, this is Europe. There's no dangers here."
But! Even if you have the vaccine in your body and potentially contracted the disease, you must still see a doctor. With rabies, for instance, sometimes an additional dose may be given, to be on the safe side.
It's also important to note that even if you aren't vaccinated and, for instance, you get bitten, it doesn't mean it's game over for you. Vaccines and temporary immunization can be given in a post-exposure treatment.
Scared of needles? Yeah, it's not too much fun. But in most cases, you will hardly notice anything but a very minimal pinch. It can hurt and there can be some side effects. But personally, I'd much rather experience those than a virus attacking my brain and body.
Some vaccines, like the tetanus or yellow fever, are usually one shot. Easy-peasy.
But others, like Rabies and Hepatitis, are given out in a very specific schedule. My Hepatitis A+B vaccine was given out over half a year!
It can be a little hard to plan that on the road, and I ended up having to extend my stay in Vienna, just for the vaccination. Fortunately, Vienna is awesome. But depending on how you plan and do your travel, it can be really annoying.
The vaccine passport
It's important to always bring this passport along with you. In some countries it serves as proof that you have required vaccines, but it's also important for the doctors that vaccinate you, because it displays your history. Number of shots, brands, etc.
Take note that sometimes the passport itself isn't sufficient proof of vaccination. You may also need a specific certificate, this is for example the case for Yellow Fever.
Some countries require that you can prove you have certain vaccines, before you're granted entry to the country. This is for example true for the Yellow Fever vaccine and a belt of African and Asian countries.
Are vaccines dangerous?
Personally I trust vaccines, because I trust the sources that say it is safe, such as my doctor. Of course, no medicine is risk-free. Side effects may occur.
But utlimately, in my logic, the disease you can contract without a vaccine is far, far worse than the side effects and risks of vaccines. My Yellow Fever vaccine gave me a sore shoulder for 1-2 days. Actually contracting Yellow Fever may cost your life.
But you should ask your doctor, if you have doubts. Remember when you read about the supposed dangers of vaccines online, that you're reading the opions of strangers - many of whom are unqualified to make the claims they do.