It's fairly simple. There are some built in equations in the PCM. They reference the VE (volumetric efficiency) table and the MAF sensor output to determine fueling. For low airflow, light throttle, and transitional throttle situations, the VE table will have a greater influence on the fueling since the MAF is less accurate. As airflow increases and becomes less volitile, the MAF's output becomes more and more accurate and therefore has a greater influence on fueling. I believe it's all the PCM looks at above 4400rpm, but I'm not 100% on that one. Anyways, fuel trims are used to correct the imperfections in the MAF curve and VE table. Short-term fuel trims (STFT) are calculated mulitple times per second based on the output of the O2 sensors in closed-loop operation (when the computer is commanding a stoich AFR - 14.63:1). Open-loop scenarios don't have fuel trim learning since the O2 sensors aren't accurate outside of the stoich range...hence the reason people need wideband O2's to tune for WOT. Basically in closed-loop operation, the computer tests the exhaust by slightly increasing and decreasing the AFR. The result is a voltage readout from the O2's that resembles a sin wave. The average of these STFT's is then learned over a period of time as a long-term fuel trims (LTFT). LTFT's are saved in a handful of "cells" that represent different driving conditions (ie - light cruising, WOT, idling, etc.). If your LTFT's are negative during normal driving conditions, then WOT will remain at 0. However, positive LTFT's are assumed to be somewhat consistant and therefore are added to WOT fueling. Again, the O2's don't work in open-loop. So, the PCM is pretty much playing a guessing game by saying, "If I'm lean at part-throttle, I could be lean at WOT and I should add more fuel." For negative trims (where the PCM is pulling fuel at part throttle), it doesn't work the same. Negative trims go to 0 at WOT because again, there's no feedback and it would rather be rich and safe than lean and sorry.
That's about the jist of it. Hope that answered all of your questions...