Transport
Most means of public transport stop functioning at night. The metro/subway is closed from 12:00AM until 05:45AM; transfers between lines close (and open) at this time, while the departure of the last (and the first) trains from each station varies slightly.
Taxis are available 24/7, but are much costlier at night. St. Petersburg does not have as many cabs as New York or London, but there are still plenty available in the center. Nowadays there are both official taxis with a checked logo on the doors and a dome light on the roof, and private taxis that come in all shapes and sizes. They usually work either with tourists or with well-off Russians at airports, railway stations, hotels, restaurants and clubs, and rates vary. Though many cars are equipped with meters, not all, so, it is important to determine the cost of the journey before the trip. In Petersburg, however, every private vehicle is a potential taxi. Flagging down a vehicle and paying for a ride somewhere is perfectly normal in Russia and quite popular although ill-advised for tourists. Safety is, of course, an issue. As a rule you should never get in a private cab if it already has passengers inside. Also, refuse driver's requests to take on more fares if he insists, ask him to stop at a safe-looking place, pay and leave. Women traveling alone (and men, for that matter) should feel free to wave off any suspicious ride for any reason whatsoever.
At night the city is divided in two by the Neva River; all the main bridges are drawn up to allow for boat traffic, except during the winter, when ice makes the river impassable. Remember to make it to your side of the river in time; otherwise, you could find yourself stuck on the wrong side until early morning. One bridge - Volodarsky - closes once per night from around 3:45AM to 4:15AM to permit crossing. Most of the others are up between 1:45AM and 5:15AM. The Big Obukhovski bridge is not drawn up, as it is an important part of Saint Petersburg Ring Highway.
Saint Petersburg's metro/subway is the second largest underground railway system in Russia, second only to Moscow. The metro/subway is arguably the cheapest and most effective way to get around the city, and also a major tourist attraction in itself thanks to the beautifully decorated stations. Taking pictures was prohibited in the past, but recently this restriction has been removed.
The trains are fast and run frequently (during rush hours 7-9 AM, 6-7 PM, as often as every 30 seconds between trains). Since 2011, the metro costs 25 rubles per journey regardless of the distance. Brass tokens (жетон – zheton) can be purchased from kiosks at station entrances and vending machines, and it's good to stock up in advance, since queues can be long and they occasionally even run out of tokens. Metro maps can be found in every train car, often with station names in the Latin alphabet. Names on station walls, however, are in Cyrillic, so if you are unfamiliar with the language, it may make sense to "count the stops" to your destination or keep your ears open, the conductor will let you know what station you are on. The Saint Petersburg metro can be unbelievably crowded during rush hour. Be aware of your belongings and don't be afraid to push when you arrive at your stop!

Trams
It is quite appropriate to call St. Petersburg the “city of trams”: it has more trams than any other city in the world and trams have been a constant presence in the city since 1862. Tram stops are marked with a “T” on signs. All trams have conductors on board who you should pay in cash, unless you have a monthly pass. Trams run from 6 a.m. to 1 a.m. (21 rubles).
Buses
The bus network in St Petersburg is extensive and fairly efficient. Bus stops are marked by signs with the letter “A” which stands for “autobus”. There are 2 types of buses: regular municipal buses, which have conductors on board (21 rubles), and commercial vans, or route taxis, called in Russian “marshrutka”. Perhaps the most efficient means of transport in the city, these carry 10-15 people and stop only for the passengers to get on or off. (20-27 rubles)
Trolleybuses
Trolleybuses are essentially electric buses that get power from electric wires. Along with trams, trolleybuses is the most environmentally-friendly public transport in St. Petersburg, though not the fastest. They can get crowded at times, particularly during rush-hours. Trolleybus stops are marked with the blue letter “T”. The fare on trolleys is the same as on trams and municipal buses. Trolleybuses also generally run from 6 a.m. to 1 a.m. (21 rubles)