How you earn Steam trading cards
Steam trading cards drop while you play participating games. Roughly every 15–30 minutes of playtime, Steam can grant you one card from that game's set, up to about half of the full set. The remaining half is meant to be completed through trading, the Steam Community Market, or booster packs — so a game with an 8-card set usually drops around 4 cards just from playing.
Booster packs are a second source: once you've received all the cards you can get from playing, you may occasionally be offered a free booster pack containing 3 random cards from a game you own. Eligibility builds with playtime, and other players can also craft your game's badge to add you to a booster pack queue.
Foil cards are rarer, shinier versions that drop only as part of special foil sets — typically a few percent chance per drop. They're worth more on the market, and a complete foil set crafts a separate foil badge.