You should be immunised against typhoid before you travel to certain parts of the world where the risk of typhoid is high - in particular, countries in the Indian subcontinent and the Middle East. There are two typhoid vaccines available in the UK - an oral and an injectable vaccine.
This is a companion discussion topic for the original article at https://patient.info/travel-and-vaccinations/travel-vaccinations-leaflet/typhoid-vaccine