EA access codes are registered online rather than typed into the game itself. The page to use is ea.onlineregister.com, where you sign in with your EA account and enter the code printed on your manual, card or receipt.
Once the code is registered, the unlock is tied to your account, so make sure you are using the same account on your console or PC when you launch the game. Codes are usually single-use and locked to a region or platform, which is why a second-hand copy sometimes comes up short.
If the site rejects your code, EA's support team is the only route that actually resolves it.