As part of the process, they tweak a variety of settings in control modules on a vehicle and then study the interrelated effects on about 150 data tables. A computer helps them with the math between all the variables. One of the most important things they watch is the horsepower of the engine and the vehicle. A dynamometer ("dyno") is used to measure torque and RPM, and a mathematical formula converts this to the horsepower measurement.
They also have to fit a larger engine with larger components into the original space, so carefully made custom pieces with precise angles and measurements are required that they make themselves.
You can check out Predator Motor Sports at their website here.
One more link: Wikipedia entry on how dynos work