During the Civil War, the national financial system was in chaos, and there was a drive towards 'revolutionary' and 'communist' practices in everyday life. The ideal economy was commonly understood as an economy running without money, on direct distribution and rationing of goods and services. In Russian historiography, this era in social and economic system of Russia is usually called the 'War Communism'.
Public transportation was the sphere where these new trends were most naturally applied by local governments. Many of them tried to run trams free of charge for riders belonging to the 'working classes' (i. e., workers and public servants). Factories were supposed to provide financial and material donations to tram depots to help them with delivering their workers to work. There is no surprise that this system failed. Everywhere tram circulation was reduced drastically; some cities had lost all tram traffic. Moscow only had passenger traffic in summers for a few years (there was cargo traffic that ran year round).
In February 1921, the Tram Conference was called in Moscow, where tram managers discussed the situation and proposed that trams should be financed through passenger revenues; and that tram workers should be paid by their output. This coincided with the nation-wide proclamation of the 'New Economic Policy'.
Ever since, the idea was such that tram (and later also bus, trolley-bus and metro) companies had to rely on their own revenues to finance operations. Government planning bodies planned the networks, assigned prices and allotted investments. Companies were created to run the services and generally they were expected to cover their expenses with revenues, though occasionally governments might intervene and provide financial help if there was a gap.
It has to be noted that in Soviet economy, a sufficiently large company (such as a bus company of a large city) had to maintain the so-called 'social sphere', i. e. clinics, kindergartens and country-side resorts; this was included in their expenses. A profitable company might invest into expanding these facilities in order to lure workforce.
Until 1950s, fares on trams and trolley-buses usually depended on distance traveled; buses and metros had flat fare. Since 1950s, flat fares became universal on all urban services. Fares were assigned for each city or locality individually per mode of transportation (bus/tram/trolley-bus/metro/minibus). Except between metro lines, you had to pay anew after every transfer.
There were also monthly passes for one or a combination of modes of transport. Although a combined pass, say, for tram and bus, would cost less than two separate passes, they were still considered pricey and were not bought unless necessary. Moreover, even one-mode passes were worth it only if you had to commute with transfers.
In late Soviet Union, bus and trolley-bus fares varied from 3 to 6 kopecks, tram fares from 3 to 5 kopecks. Metro fare was 5 kopecks in all cities (with automatic gates operating on 5-kopeck coins). By the end of 1980s, most companies brought losses, typically measured by fractions of kopecks per ticket.
Suburban services were paid per kilometer; sometimes, you might use an urban stretch of a suburban service and be lucky to pay less than normal urban fare.