There are a lot of different card grading companies... PSA is one of the most well-known and recently BGS has come along too. But as you've noticed, it is rather spendy. Also, it takes forever unless you pay even more for "expedited" grading. Generally, it's not worth grading lower-end cards for this reason UNLESS it's one of the few cards that can sell for like 100x it's mint value if it grades a 10. It's basically a gamble. When you have more valuable cards, even ungraded, then grading does provide a reliable standard for people buying cards over the 'net.
But graded cards have drawbacks too: A lot of collectors aren't interested in them at all. Myself included. People who don't collect for value or investment generally don't care for graded cards because the size of the slab they're encased in means you can't keep them in the same filing system as other cards. You can't put them in binders or shoeboxes or what-have-you. Also, if you have enough they take up a lot of space and weigh a lot. I won't ever buy a card if it's graded, even if I need it for my collection, unless I feel like breaking it out of the case. Let me tell you... that is HARD!
The way grading works is pretty simple... you basically send in your card, some experts (or so they say) look over the card in great detail, score it, and put it into a tamperproof plastic case. They rate the corners, the centering, the surface quality and several other things. Some companies even grade each individual criteria and then average them to get the final "score".
Getting your cards graded before selling them means investing some cash up front; reducing your customer base (remember not everyone likes graded cards), and possibly getting a better sale price if the card grades well. The gamble comes down to weighing factors like who the player is; whether it's a "hot" card for that player; whether the card's value is high enough to justifying grading in the first place, etc.