Confinement and supervision is critical for the early stages. (It's much kinder to go through this for a few weeks early on in a bunny's life so that it can have a life time of roaming about and interacting with the family). So you should start in one room, and confine your bunny to its cage (with the litter box) for a bit until you learn where (s)he likes to do the business. If it's in the litter box - great! If not, no worries, just move the box over that way.
After you've achieved success IN the cage, it's time to provide freedom. The key here is to do it only a little at a time, step by step (and be willing to go back a step if bunny makes a mistake).
So give bunny a limited area of freedom in the room, and make sure (s)he knows where the litter box is. (Spend some time getting bunny to come to the box with treats and praise).
Watch for signs that 'the business' is going to happen soon, get bunny to the box when it's going to happen, and give ample praise and treats when it does.
Just like you did in the cage, if bunny is making mistakes,... think of it as his or her way of telling you "the box belongs over here,... not where you put it"... and just move the box for bunny.
Sometimes you actually need to have two or three litter boxes in a larger space for a while... then you remove one at a time
Punishment is NOT a good idea for mistakes with rabbits. It's better to simply withold the rewards and treats and praise until you get the behavior you want. (And use a lot of patience)
Some people have trouble because they're not really sure how to know when their bunny is about to go. Establishing regular feeding times, and other routines will help with this problem. (Mostly though, you'll get used to your bunny's signs if you pay attention for a few weeks)
Once your bunny is using the litter boxes outside of the cage, the idea is to slowly expand their allowed roaming area, until you can confidently see your bunny anywhere in the house without worrying about 'little presents' (and smells).
Please note that litter training is almost never perfect... there are usually a few pellets left near the box which can be easily wiped away. (Bunnies aren't perfect... and neither are we, right?)