For the CD key: Your best bet is to check the game's CD case or manual. Most software includes a unique serial number to protect it, and every copy has its own code that won't match anyone else's.
If you've lost your key, some companies let registered customers retrieve it, so that's worth a try. Otherwise, it's very unlikely a random serial will work with your specific copy.
One more thing: If you're asking about a pirated copy, sorry, but I can't help with that—piracy isn't something I support. If you actually meant a cheat code, just let me know and I'll try to point you in the right direction.