Simply replacing a malfunctioned spark plug might not suffice, sometimes it resulted from more serious issues underneath.
If you want your car to be with you longer, you ought to know how to read the spark plug. "Why don't I just change it?", one might ask, and that seems to be a normal question. In fact, knowing how to do this task will tell you much more about the underlying issues of your vehicle and that you would know why, say, your engine is still in trouble even when you have changed the spark plug once or twice.
In short, you'd know that the real reason is the overheating engine, the oil doesn't burn fast enough, the air-fuel mixture is rich or lean, the ignition timing is off and everything similar, instead of the only word "malfunctioned". Therefore, if the problems are one or all of the above, changing the plug wouldn't help at all.
The spark plug heat range
This is used to describe the range of heat the spark plug could be able to operate in normal condition. If the condition of the plug matches the engine's, it will stay in its best working temperature and combust excessive fuel or residue; otherwise, overheated atmosphere would cause premature air-fuel explosions. By contrast, when the temperature is lower than ideal for the spark to work, it won't be able to burn off carbon residue fast enough and it will stick around in greater volume than usual.
2 completely identical plugs could still have different heat ranges
Given those above reasons, you should always choose a spark plug that operates within your engine's operational heat range. It is notable that sometimes two spark plugs with totally different operating temperature range can look exactly the same, so be sure to read its details before spending your money. Having said that, on some rare occasions, you actually need a spark plug that operates at a slightly cooler or hotter heat range than the engine's.
For example, when your car is experiencing the residue issues, you should change it to the one that works in a higher temperature range so as to burn off excessive residue faster than it builds up. In other cases, you should not use it to prevent premature explosion inside the burning chamber.
There are other situations, though
On the other hand, if your purpose is to increase the performance of the car, for instance, when you suddenly want to participate in a race or when you need to tow a heavy truck/car and need the crankshaft of your car to run more stable at a higher RPM, then the spark that operates at a cooler level might be better. Still, that doesn't guarantee a fool-proof session, you still need to be gentle with your car.