Yes, in most versions. A card or activation code is normally required to register the game and get past the login screen.
Codes come with the physical product or by email for digital purchases, and each one is single-use. If you've lost yours, the retailer or publisher's support channel is the only place that can reissue it — nobody else's code will work on your copy.