Depends what steam codes you are referring to. If you buy a game from a third party seller (GMG/Amazon/etc.) they will supply you with a code you need to input into Steam.
Sometimes when you start a game steam will say this game needs you to input certain codes in order for it to work properly, you will need to input those codes in the game to unlock certain features.
I bought Tomb Raider new from GAME, and there's a code in it
Edit: Just curious, but what happens if you don't have the internet?