As seen here, different rests mean different bonuses. But how do I rest? In-game, I guess I need a bed or something like that? And In Real Life, do I have to wait some time here? Or I just wait the fictional game-time?
The exact rules of resting are left vague, as it says in the link you included. The exact method of resting is generally up to the dungeon master, but in general you can expect that to rest you need only be able to spend the full length of time, 8 hours for example, sleeping in a location where you will not be interrupted. It is not stated anywhere that you need a bed, or something similar, but the DM may say otherwise.
As for having to wait in real life, no you do not have to wait. Generally the DM will just say that you have rested and do a time skip, or say that you have been interrupted by a wandering monster which would require an encounter, for example, and then continue play.