What is a key code?

A key code is a promotional code or a key used on games to see its legal or what not.