The engine control unit (ECU) is a computer that controls the fuel injection system for an engine. This computer takes input from a number of sensors (intake air temperature, RPM, etc) and outputs to a number of actuators (injectors, coils, solenoids, etc). The way that it does this is to run a program that is stored in the ECUs memory. This program is commonly referred to as a ROM, for read only memory, but in modern ECUs, the program is actually stored in flash memory, and can actually be overwritten like you would a flash drive on your computer. Well, not exactly like that, but the idea is the same.
Within the ROM are lookup tables (or maps) that describe, for instance, how much fuel the injectors should spray for a given RPM and engine load. Modifying these maps allows you to increase the power output of your engine, if you know what you are doing, or can cause detonation and other badness, if you don't know what you are doing. This sort of table modification is the first step in modifying the program that the ECU runs. The next step is to actually modify the program to add functionality (say to allow for the use of a wideband O2 sensor).
Over the past couple of years, open source software tools (http://www.openecu.org, http://code.google.com/p/ecuexplorer) have been developed that allow Subaru owners to read and write to the onboard ECU memory using a suitable cable (check http://www.tactrix.com) and a PC. An open source project for Honda ECU reverse engineering is http://www.pgmfi.org. Aside from open source reflashing projects, there are a number of vendors that will reflash your ECU for a price or sell a tool that will reflash your ECU, and also some that sell complete replacement ECUs. The open source tools have a number of advantages for those interested enough to learn a little about them, but they require you to take responsibility for the changes you make.
A good source for general info on ECU is http://auto.howstuffworks.com/car-computer.htm.