First of all, grading and meat inspection are two separate things. It is mandatory for all beef to be inspected by the USDA. To pass, inspectors are primarily checking that the meat is safe to eat (no signs of disease, kept in sanitary conditions, etc.).
On the other hand, meat grading is optional. A particular grade is meant to guarantee a certain quality to the meat. Grading inspectors look for conformation and finish, which respectively refer to the ratio of meat to bone, and the amount and quality of fat. Meat grading does not take into consideration how the cow was raised or what it was fed.
There are really only three grades that are commonly found in the markets:
1. Prime - According to the USDA, this is the top quality meat. It's well-marbled with big chunks of interior fat. Most of the prime meat in the United States ends up going to restaurants, so if you happen to see it for sale and you can afford it, by all means snatch it up!
2. Choice - This is the highest quality meat you will typically find in the stores. It has slightly less marbling than Prime Grade meat, but will still give you a juicy and flavorful steak.
3. Select - Cuts of meat graded as Select will be slightly more lean and less tender once cooked, even if they come from the loin region. These cuts do very well when marinated.
Decreasing in comparative quality, the other cuts of meat are standard, commercial, utility, cutter, and canner. These meats are used in things like processed meat products and pet food, or they're mixed into ground beef to achieve certain fat percentages. Remember, there's nothing wrong with this meat (it still passed inspection), but it's just not usually the best for cooking as whole cuts.
One other random trivia fact that's good to remember: prime rib does not necessarily equal prime grade. Prime rib is actually a particular cut of beef, but tricky marketing can sometimes get it passed off as prime grade meat.
Related: Money Saving Tip: Buy Bone-In Meat