Hi Ru8bin-
By 'trolley bus', do you mean the electric buses that have contact arms reaching up to overhead wires? Those are commonly found in large cities where they reduce pollution by running entirely on electricity. This is an old one in Los Angeles, CA for anyone else reading this that doesn't know what they look like.
I can tell you how they work. At it's heart, it's an electric bus in the same sort of way that an electric car works. It has electric motors instead of gas or diesel engines. Unlike an electric car though, it has no batteries. To get power, it has to run underneath a grid of electric wires strung up by the city.
The wires are attached to poles next to the street and carefully stretched and mounted so that they are the same width apart and same height over the road (usually about 18 to 20 feet). The pair of wires is insulated from the poles and provides about 500 to 600 volts to the bus below. The bus has a pair of arms that use springs to push firmly up on the wires, making contact and providing a current path to the bus electronics. A conductive wheel (sometimes just a metal shoe) at the end of the pole rolls along the wire.

From there, wires bring the power into the bus and the operator controls send that to the motors.
Building your own would be fun. For starters, you need to make a model road of some kind. Pick a scale that's reasonable and imagine a model bus that size. a 1:12 scale would mean that for every 1 foot in real life, your model would be 1 inch. 1:24 is a very popular scale and you can buy all sorts of pre made model buses in that size. A bus that normally stands 10 feet would be 5 inches tall. At that scale, the wires 18 feet over the road surface would be 18*12/24, or 9 inches over the road surface. You'll have to invent a cool method of suspending the wires at that height and keeping them inserted from each other and the poles. The bus will have to have a motor stuck in it unless you can find a toy bus with a motor already in place. Whatever voltage that motor needs (it might be 3 to 6 volts perhaps), that's what you'd energize your wires with. Don't worry about safety because a few volts from a battery isn't dangerous. Put some spring loaded arms on top of the bus.
You might actually find kits in model railroad scale for a project like this. Model railroaders love to make tiny replicas of all things in cities and I know that electric trolleys are often pet projects. If you can't find a model railroad kit you'll be building this with your own design and parts that you find yourself. It will be a little ambitious so be sure to start early and leave yourself plenty of time.
Howard