A bathroom fan that vents to the outside of your home is the surest way to air it out, but simply cracking a window is helpful during mild weather months. It's also a good idea to keep a stock of candles and matches in your bathroom. Light a candle when you have guests coming over and keep matches in an easy to access area.
There are two main components in maintaining a fresh bathroom. One has to do with the way it looks and the other has to do with the way it smells. Because the bathroom houses the toilet, keeping smells at bay is somewhat of a challenge -- but not impossible. The most important thing is to be sure you have good ventilation.
Another place you can get some foul smells is from used bath towels. Wash your towels often and hang them up so that they can fully dry between uses. Towels that aren't able to dry quickly enough will smell musty. The same goes for any kind of floor mat you use. Make sure it dries out fully between uses.
There are also some clever ways you can help your bathroom smelling clean. Place a cup of vinegar on the floor of your shower when you aren't using it and close the door or curtain. This will draw in foul smelling odors when you aren't around to maintain things yourself. Linen spray can also be used on towels, bath mats and even the shower curtain. If you have a home garden, you can place fresh cut flowers in a vase in the bathroom for delightful floral scents. Potpourri and other store bought air fresheners are fine to use as well, as long as you don't mind the heavy scent that comes along with those products. Citrus scents are a good match for the bathroom and aren't as pungent as the floral scented products.