Some ECUs has the possibility of reprogram via OBD2 protocol (for flash ECU), others are maker specific. For more information about reprogram via OBD2 see SAE J2190 Standard, but it isn't simple because ECU give you a code and you has to give to ECU an password that depends of code ... e.g, you have to know ECU algorithm to generate this passwords. At others ECUs you simple modify the car map modifying the EEPROM memory (but you have know the position of parameters for do it), than you can modify torque curve, rpm limits, give more power for car, for example a engine that can do 150hp, in some countries, can be limited to 130hp because of federal tributes are expensive for engines with power superior to 130hp. Than the maker limits this power using the ECU, and you give more power to them ... I know it because I worked in FIAT SPA and power in PALIO is limited in Brazil for this reason ...
I'm not specialist in reprogram, I'm just doing a project to extract information via OBD2 (J1850PWM, J1850VPW, ISO9141-2, KWP2000, OBD-CAN) and for trucks J1708, but again in forum that I send has some information because has some ECU hackers that can suggest you a program to do reprogram of you unit.
The J2190 and others SAE standards can be found in OPENDIAG in files link, but this standard give you only the method to request an write in flash memory of ECU, but exactly positions of parameter you wanna change only reading, make tests, e.g hacking or you have worked in BOSCH, MAGNET MARELLI ....
https://groups.yahoo.com/group/opendiag/files/SAE Standards/
leomecma