Opening a pack in Hearthstone adds five cards to your collection, and there's rules in place to make sure you don’t see duplicate legendary cards

There will never be more copies of any card in a pack than you can use in a single deck—two copies for common, epic, and rare; one copy for legendaries.

If you receive a legendary card, it's guaranteed to be a legendary that's not in your collection until you collect every legendary for that set. After we release a new expansion, you will receive at least one legendary card from that set within the first ten expansion packs you open.