Suppose I start the engine of my car, but keep it stationary. At this point, I start the ac or use a vaccum cleaner from the power outlet (engine still running). Then will the power be consumed from engine or battery?
The alternator powers the electrical system while the engine is running providing 13.5 to 14.5 volts.
The battery is primarily for starting the engine and to provide backup power for when the engine is not running / turning the alternator.
To answer your question, power would be provided by the alternator.
yes, electrical power would be being used, but with key on/engine running (engine running, but vehicle in park or neutral), the alternator will be charging the system (battery), so battery will not 'die' like it could if vehicle ignition was in key on/engine off. yes, 'gasoline' power is also being used, and may be used less efficiently with a/c on.
While the alternator may be producing enough at tickover or idle to put the warning light out - if you run a vacuum cleaner you would be most likely taking charge out of the battery.
To understand the effect of engine speed and why an alternator won't produce much power at engine idle but will start to charge above 1500 rpm (engine) this is a good link : http://www.hotrod.com/articles/0206sr-understanding-your-alternator/