Melbourne's network of trains, trams, and a select few buses is excellent and will get you around the city cheaply and efficiently. And generally provides a better option than driving (with the big city hassles of parking and traffic).
The general set-up is 17 suburban train lines extending from the CBD well out into the suburbs. There is also an underground subway line that combines with the train line to make a loop around the CBD. The trains are very quick and run frequently.
Though there are a few buses, the remainder of the system is filled in with Melbourne's beloved trams.
When it comes to fares the system is divided into zones. Zone 1 will likely encompass anywhere you want to go (including St Kilda and Williamstown). With zone 2 being the most outer reaches of the metropolitan area, and zone 3 being outlying suburbs and bedroom communities.
If you are visiting the city as a tourist, like I was, you will likely find the day pass the best option. It costs AU$6.10 for zone one. Allowing you unlimited trips for the entire day. Rather than charge you per trip, the tickets are timed (from when you first use it). If you weren't to get a day pass you would get a two-hour ticket for $3.20. These two-hour tickets are good for the entire night if purchased after 7pm.
You can buy "Metcards" at train stations from vending machines. There are machines on the trams and buses as well, however they only sell short-trip and 2 hour passes.
You may find it odd that at some of the smaller train stations you can board the train without validating your ticket. This is compensated by the fact that you must validate your ticket to get both in and out of the major stations. On trams you are theoretically expected to validate your card in one of several validating machines.
In practice you could probably dodge fares on the trams. Though there are ticket inspectors riding the trams who try to catch people doing just that.
Services run 5am-midnight except on Sundays when they run 8am-11pm. There are NightRider buses that run when the trains don't, generally along the same routes.
The system is clean, efficient, and seemed very safe. For more information, route maps, and a list of fares visit this website.
There are a few more things you may appreciate knowing. Train doors do not open automatically. When the train stops you need to grab the handle and start to pull it open. You don't pull much before it opens the rest of the way for you.
Also the City Circle Tram is free! This tram makes for a good way to get a good overview of Melbourne's downtown sights. And indeed it is particularly geared towards tourists.