That depends upon the tld (top level domain) that you choose, and the registrar through whom you choose to register the name
In the vast majority of cases,for example with .com and .info names, it takes as long as filling out a form online and paying. Once your payment is processed, the domain name is registered.
Registering the domain name, though, doesn't mean that your site will immediately pop up when that domain name is typed. First you have to ensure that your registered domain name is set up pointing towards your hosting account nameservers (ask your hosting providers for this information if you've registered the name independently of them - otherwise they should have all of this taken care of). Once this is done, it may take up to 48 hrs before your site appears magically when typed. This is because the information tying your domain name to the server needs to be registered throughout the giant network that is the internet. Think of it as thousands of machines updating their address books, so they know where you are.
For tld's that involve some element of qualification criteria, the registration will take longer and usually involve more form filling out.