Cold plugs can foul but helps with detonation issues. Hot plugs can cause detonation and hurt the engine quickly. For racing purposes a colder plug will benefit you.

There are some guidelines for this but it usually has some trial and error to it.