You'll need to use the services of a recognised travel agency. Obviously, if you've used such an agency for your travel plans, you should use the same one, because their service will either be free (except for the actual cost of a visa) or relatively inexpensive. Otherwise, you need to find a company, such as Russian Gateway, to assist you. Such services aren't particularly cheap: http://www.russiangateway.co.uk/visa.html
when I went a few years back you had to have something like an invitation to get the visa the advice above is right as it was complicated so get the experts to do it for you
we are going on a baltic cruise in august,which stops at st petersburg,i had a mind to try and get our own visas,so we could do our own thing instead of going on the ships tour,but it turned out such a complicated and expensive way to do it,we have decided its a lot cheaper to go on the ships tour and let them do all the paper work.