The most responsible and respectful way to dispose of a tampon is to wrap it or place it in something and throw it in the garbage. For discretion, you can wrap the tampon in toilet paper or a facial tissue and then toss. You can also buy small bags made for wrapping tampons or pads in before disposal. Many public restrooms have small metal receptacles hanging on the wall of the stall that you can use rather than carrying your deposit through the bathroom. Be sure to dispose of the tampon applicator in the same way -- you can use the wrapper that it came in to throw it away!
In most public facilities, there is a receptacle located an arm length away from the toilet, if not closer. Most come lined with a paper bag. After removing my tampon or pad, I wrap it up in some toilet paper and then put it in the aforementioned container. If for some reason there isn’t a designated drop box, I still wrap it and then dump it in the garbage that is, hopefully, outside the toilet stall. Flushing tampons isn’t a great idea -- it can be bad for plumbing. If camping, I keep a supply of plastic bags like the ones from the grocery store and put my used tampons there, a couple or so to a bag, and then take them out with the rest of the garbage. At home, a quick wrap and into the trash they go.
I know some girls flush tampons down the toilet, but it depends on the kind of tampon and the kind of plumbing. So if you don’t know, I wouldn’t. Anything plastic should definitely be thrown away in the trash. If they're a little messy, you can wrap them in toilet paper first (or slip it back into the wrapper), but it's up to you!