Yes, they clean themselves regularly, but you can contribute to the cause by daily brushing and combing. You can also check your pet's body for lumps, bumps or cysts. If, despite these efforts, hairballs are an occasional problem, there are products available that work as both laxatives and lubricants to eliminate the bolus. Even if only one makes its way onto your pet, it's an indication that there are hundreds more where that came from. Although dips, shampoos, flea powders and collars are widely used and available, there are some drawbacks.
Some vets are keen on Advantage, a relatively new topical solution that's available by prescription.
You'll also have to treat the home environment, both indoor and outdoor, and there are sprays, foams, foggers and powders to help you do that. To determine which, consult your veterinarian. This disease, if contracted by pregnant woman, will severely damage the fetus. But before panic sets in, you must realize that there has never been a documented case of such a prenatal infection in which the causative factor was a cat. Your cannot get the disease by handling your cat.