Is it possible to get rid of a cavity? It depends on how deep it is.
Acid from bacteria in your mouth can cause your tooth to decay. First, the acid eats away the very hard outer layer of your tooth, called the enamel. Inside the enamel is the dentin. It's spongy and has nerve endings, so your tooth might be sensitive to sweets or cold if the decay reaches there. But the cavity doesn't really start to hurt until it gets through the dentin to the soft pulp. That's when you get a toothache.
Dentists sometimes will fix a cavity by putting in a filling while the decay is still in the enamel. But decay is reversible until it reaches the dentin. If it's properly treated, the decay will stop, and the enamel will harden, although the tooth will never be perfect again.
Dentists can help by giving you a fluoride treatment, but you have to brush and floss regularly to prevent tooth decay. You might have to give up soda and sweets. So, it's not easy--and dentists know that. That's why they sometimes fill a cavity in its early stages, before it starts to hurt.
So you're not stuck with tooth decay once it happens, but it's better not to let it happen in the first place.