Typhoid fever is mainly spread fecal-orally. The way this spread works is if a non-infected person drinks water that got contaminated by an infected person's feces and/or urine (though that is not quite as likely).
Sometimes, a victim may "recover" from typhoid fever but still be infected with the bacteria. Even though this person is still technically ill, they don't suffer from any disease symptoms. These people are dangerous because they can still pass on the bacteria through fecal-oral transmission (see above). They are called "carriers" or "chronic carriers."
Typhoid fever spread flow chart