I'd just like to understand what happen on the car, electricity wise or power wise when you step on the gas? This is for AT car, does the power source switch from something to something else?

Our car is having a problem with idle mode, a honda mechanic suggested ILP (idle learning process) and it didnt work, i noticed that the problem isnt necessarily on the idle part, sometimes if I "flick" on the gas and quickly release it, it feels like its disconnecting from one power and connecting to another, but since i quickly release it the connecting part didnt happen and the engine would stop. Engine also stop when shifting from D to N or P (but not always). The problems seems to persist on switching to and from idle.

Also we brought it to honda and there was a note on the last PM "check alternator charging", so i thought its a problem with alternator, but i tested the alternator with this and it passed:
Clues That Your Alternator is Bad
There are two tests you can perform at home that can give you an indication whether your alternator is working properly. Try one or both of these before spending any money on repairs:

Try the headlight test. Turn your car headlights on while the car is running. Do this outside so carbon monoxide gas buildup doesn't become a problem. Press the accelerator while the car is in park. If the headlights dim or get brighter when you press the accelerator, your alternator could be bad. If the headlights remain the same, your alternator is probably fine.
Try the battery test. Turn the car ignition on and open the engine hood. While the car is running, remove the negative cable on the battery. If the car suddenly stalls and dies, your alternator could be bad. This is because the alternator is not generating enough electricity to keep the car running. If the car keeps running, the battery might be the problem.
the car will be brought back to honda tomorrow, but i just like to know or learn whats this problem.