Pilot light on switch comes on when light is off
With pilot switches, you can get any combination you want, simply by wiring it differently.  




Top: the pilot is on when the switch/light is on. 
Middle: The pilot is on always. 
Bottom: The pilot is on when the switch/light is off.  However, this works by leaking power through the bulb.  So it only works if the bulb is not burned out, and is able to tolerate this leakage (incandescents can for sure.) 


In these drawings, ground is omitted for clarity, neutral is white, always-hot is black, and switched-hot is red for clarity.   The internal arrangement of the pilot switch is shown, so you can see why it works. 

Note also the "upper right terminal" in my drawings.  See how it serves both the switch and the light.  In some pilot switches, this actually comes out to two screws on the side of the pilot switch with this side considered "common". In that case, the "sides" on your switch won't be in the same places, not that they ever are.