Basically all you have to do is get an ISBN (there's a website for that), a barcode (there's a website for that!) and a Library of Congress Control Number (and there's a website for that, too!). And then, of course, you need to have the book's contents all set to go and find a professional place to print it. It all costs money, but it's not impossible. It took a little while, but I hear if you try to submit your stuff to publishers instead, it can take years. Self-publishing is a faster alternative, and really the only difference is that the whole thing is your responsibility to promote and reprint and so on.
For the websites I mentioned, just google the stuff and it will come up. I'm sure I could find the sites for you, though, if you wanted me to. XD
Also, warning: Like I said before, it... costs money.
But of course, everything does! But thought I'd throw that out there. ISBN numbers cost, the barcode cost us some, uh... I dunno about the LCCN, but the printing cost us. It's really nice, though. <3 People who say it's impossible to self-publish just aren't trying. It's not so bad.