Getting published is where you submit, rewrite, rehash and resubmit until a publisher finally accepts what you've written and pays you for it. A vanity publisher will want you to pay him instead. Self-publishing is where you know you're going to pay for everything pretty much from the start.Feel free to add comments to Spambait's discourse.
With self-publishing the author can choose to pay very little by using photocopy services, staples and hand folding a pamphlet up to hiring a bindery to print and bind his manuscript.
A vanity publisher is going to try to make you believe your book or whatever is the next runaway best seller, charge you a large fee and send you several cases of books for you to do as you please.
Then there's self publishing on the internet by using a blog, webboard or maybe a dedicated website.
Since I run a web hosting company and assist people who choose to "publish" on the web you could consider me a vanity publisher of sorts.
Well, I'm not going to tell a client their writing is outstanding and they should make millions but I'm not going to discourage a client with a good idea either.
Nice thing about web publishing is you can easily revise your writing. Bad thing about publishing is you can easily revise your writing.
On the web your audience knows revisions will probably happen. This isn't really good for fictional works as the reader may see a early version that then gets revised to the point of being a total different work. But web publishing might be great for a chapter or two of a book in pre-release form.
If you have a lot to say in a changing venue or market though, web publishing might be the way to go. If you have a local guide or informational product that will fit the pamphlet format self publishing might work for you.
If you're willing to take a large risk with a novel or a book of poems and can't find a publisher you might want a vanity publisher to take the printing binding tasks off your shoulders. You can then do the distribution yourself.
The risks are fairly large but lots of best sellers started life as self published works. The Christmas Box started out as a self published work for the authors family and friends at the urging of his family.