Typhoid fever is caused by a type of bacteria called Salmonella typhi.
This isn't the same bacteria that cause salmonella food poisoning, but they are related.
The Salmonella typhi bacteria will be in the poo of an infected person after they have been to the toilet.
If they don't wash their hands properly afterwards, they can contaminate any food they touch. Anyone else who eats this food may also become infected.
Less commonly, the Salmonella typhi bacteria can be passed out in an infected person's pee.
Again, if an infected person handles food without washing their hands properly after peeing, they can spread the infection to someone else who eats the contaminated food.
In parts of the world with poor sanitation, infected human waste can contaminate the water supply.
People who drink contaminated water or eat food washed in contaminated water can develop typhoid fever.
Other ways typhoid fever can be contracted include:
After eating food or drinking water contaminated with the Salmonella typhi bacteria, the bacteria moves down into the digestive system, where they will quickly multiply.
This triggers a high temperature, stomach pain and constipation or diarrhoea.
Left untreated, the bacteria can get into the bloodstream and spread to other areas of the body.
This can cause the symptoms of typhoid fever to get worse during the weeks after infection.
If organs and tissues become damaged as a result of the infection, it can cause serious complications, such as internal bleeding or a section of the bowel splitting open.
Read more about the complications of typhoid fever.