Is the Auxiliary Power Unit used after landing when ground power is available?
How do pilots know that the ground power is connected?
The ground crew hooks a headset to the plane to communicate with the flight deck.
Once the ground power is connected, they confirm it, also a light comes on in the flight deck confirming external power is now available.
(Source) Ground power switch and light on a Boeing 737.
In a twin-jet airliner, they usually (subject to company) taxi-in with one engine, the other being shut down after it had time to cool down after the reversers are stowed.
They usually shut down the number 2 engine, the starboard side, where the GPU and other ground crew members approach the plane as soon as it is parked.
Many airports have restrictions with regard to keeping the APU running at the gate, due to emissions and noise, unless the plane is pushing back.
Related: Do airliners have horns for use on the ground?