http://steamcommunity.com/tradingcards/Basically, there are two kinds currently: game cards and Summer Sale cards.
For participating games, you earn about half of the total cards just by playing. Say a game has 8 cards; you'll get four card drops by spending a couple of hours in the game. These drops are completely random, though, so they could all be the same card. You can craft a game badge using one of every card for the game.
Summer Sale cards are earned for every $10 spent during the sale and for every 3 votes toward community choice sales. The badge is crafted the same way.
When a badge is crafted, you get Steam experience. You get profile backgrounds, coupons, and/or emoticons. Except during this summer sale, you get a summer sale card instead of a coupon.
And you can craft each badge as many times as you want, still getting the rewards.
And apparently booster packs are given out randomly, with your chance of getting one increasing with your Steam level. They contain 3 cards for a game you've gotten all of your drops for.
And foil cards are another set entirely for each game/sale. The badges net the same experience; I don't know if they have better rewards or not.
You can put your cards up for sale on the Steam Marketplace, like many other items. You can also buy cards there.
F2P games grant you one card drop per $9 you spend in-game.