Basic rundown. Power supply cord and pump neutrals are connected, white lines. Hot (black or sometimes red) from cord goes to one contact ( usually marked for load coming in) on switch. Hot from pump connects to other contact on switch. If the light on switch stays lit at the wrong time than most likely you have the load contacts reversed, if that makes sense. All three grounds connected together, pump, switch, power cord.