When I pedal the rear wheel is not turning I have a very old bike. It used to work perfectly, but just recently it happened that when I pedal the rear wheel is not turning. Just for notice I pedal in the correct direction, brakes are not stopping the wheel... The chain is properly mounted, the casette or freehub (I don't really know how it is called, that thing on which the chain resides on the back wheel) is spinning while I pedal, but the wheel is not. So I guess the problem is somewhere in the back wheel. 

So I thought that something is completely broken, but sometimes the wheel is turning when I pedal. Thus I don't know if it is totally broken or is maybe just clogged, or whatever.

Is there a way to just repair it without buying new things?

Thank you for your time and answers (p.s. sorry for my bad English)
This sounds like either the freehub on the rear wheel, if you have the newer cassette style, or the freewheel, if you have the older thread on design, needs to be replaced.

These parts contain the pawls which drive the wheel forward when you pedal. If the pawls are broken, or simply not engaging the hub shell, you will pedal with no forward movement.

See this answer to the question What causes the noise that race wheels make when you are not pedaling?