The MetroRail Southern Suburbs line is an affordable, scenic, and generally safe way to travel from Cape Town down to Simonstown. Is it the most comfortable way to travel down the peninsula? Maybe not, but if you're used to using any large city's public transport, you'll do just fine. You can purchase a ticket at Cape Town Station on Adderly Street (one-way or return). Make sure to check the timetables, because trains run less frequently on weekends, and you'll also want to avoid taking the train at night.
There are two classes - 1st (MetroPlus) and 3rd - with little visible difference between the two (other than fare). Third might be a little uncomfortable for the average tourist (feels like you're stuck in a can of sardines quite quickly) so I recommend taking First to new riders. When leaving Cape Town station, the first train cars closest to the station are First Class.
In general, you should keep all valuables hidden and use discretion when taking photographs between Muizenberg and Simonstown. You'll probably notice MetroRail staff working their way through the train during your ride, and they may ask to see your ticket. When exiting the train, some stations will ask to see your ticket (and punch or initial it) and some stations will be empty. There is a fine if you are caught without a ticket, however.