Pull out a bar of your favorite soap. Suds it up a little with your fingers, then smear it over your lenses. Once the mixture has dried on the lenses a bit, buff it away with a soft cloth. By leaving a bit of soap on your glasses, you're creating a barrier to keep away the fog. Toothpaste also works, but it's a bit harder to remove with the cloth.
Get semi-professional help. There are a ton of products -- like Chums, CR Lawrence, or Cat Crap -- that you apply to your glasses to keep them from fogging up. Make sure to follow the instructions on the package to get the best result.
Try an anti-fog cloth. A little bit of cloth goes a long way and you only have to rub your lenses every couple weeks to keep them clear. Keep in mind that if you touch your lenses after you've rubbed them with the cloth, they're going to look like a party girl the day after Halloween -- a hot mess.
It may sound gross -- and it's more a quick fix than a permanent one -- but your spit has proteins that will keep away the fog. Smear a little on the inner part of your lenses and you should have glasses that resist fog build up. Definitely try another method once you're home or have a chance to run to the store, but spit is quick, cheap and useful basically anywhere.
Throw out those old glasses if absolutely nothing else is working. A set of frames that sit close to your eyes may look foxy, but they're not letting the air circulate, so you're building steam more quickly. Find something that leaves a little more space to keep your lenses clear. Smaller, lightweight lenses also fog less than large ones. If you're buying new glasses, ask about an anti-fog coating applied before you purchase them. It may raise the price, but the results could be well worth the cost.