How can you stop drinking soda?

Just don't drink it! Tapering off soda is probably the best way to do it: try mixing in other beverages that aren't carbonated. If, for example, you drink 5 cans of soda a day, start by cutting down to 4 a day for a week, then 3, and so on. Make it a point to drink water or any other type of healthy drink and increase those as you decrease your soda. Maybe you'll end up liking something else better that's healthy!
Habits. Drinking soda, like any habit, can be changed by understanding the positive and negative aspects of the habit, and substituting the habit or substance such as soda, with a healthier alternative. Soda has virtually no positive nutrients, diet drinks can make you want to eat more, and sugared sodas can make you gain 20 or more lbs per year. Flavored waters, water, and juices have more +nutrition.
Agree w Dr. Spector. If you are drinking large amounts of caffeinated soda- it would be best to taper down. If you go off cold turkey, you might feel a little like road kill initially.
Substitute water. Resist subbing fruit juice as it is just as caloric. When thirsty, try drinking a glass of water first, and see if you still want the soda. Get only small cans or bottles instead of 2l, 20 oz or larger. You'll eventually start finding it's either too sweet, or will taste better than you remember. I often dilute crystal light mix in twice the recommended water for just a perfect mild flavor.