Called an ECU for short, the Engine Control Unit is the computer in charge of all the electronic functions of the engine. It gathers information from various sensors to make minor changes to the various timed events it is in charge of (which events these are differ by engine model and year) so the engine can run more efficently. Every version of an engine has a different ECU, and some cars have better computers than others.
Unlike most parts which need to be replaced with a higher-quality one for performance gains, many ECUs can be tuned with the proper equipment. Depending on the vehicle, the tuning can include things like the amount of fuel used at various engine speeds, spark timing, fuel injector timing, how to react to different throttle levels, and other electronically-controlled components.
However, not all engine control units are tunable (also known as "writable", like a computer hard drive), so if you want to tune the chip in your vehicle, you will have to make sure you are able to before buying a tuning kit. Some vehicles come with both options, and sometimes those with both options are as such because the stock chip doesn't have as many tuning options as the aftermarket chip.
Most engine control units record problems (in the form of OBD codes) into a memory cache, so anyone that plugs into the on-board diagnostic port can find out what the computer has noticed problems with, which takes a lot of the guesswork out of fixing the vehicle. This is also tied into the check-engine light.
Note: not all OBD information comes from the ECU.