First of buy a litter tray just like the ones they sell for cats. Place this in one area of your house and make sure you always put it back in this area, if you don't your rabbit will get confused and be looking for it and if they don't see it they will just go to the loo where they are sitting.
Fill this tray up with strips of newspaper and/or bedding hay which they sell in pet stores. Do not use cat litter ever. Very dangerous.
Rabbits are pretty smart creatures, they will figure out quite quickly that this nice area filled with paper and/or straw is where they need to go potty.
I can't give you the exact length of time it will take to train your rabbit but for my guy he picked it up quickly. You will have one or two mishaps but that's to be expected.
Hope this helps.