A switch is a component that switches a circuit on or off by making contact or breaking contact. The switch has mechanical metal contacts that let electricity flow through it in the make contact or ON position. In the break contact or OFF position the contacts doesn’t touch and electricity can’t flow through it.
The non-latching switch is a special kind of switch that makes contact when you push it but when you release it, it breaks contact again. It don’t latch into position and it only makes contact as long as you press it.
The Non-latching Switch is normally used in push button applications such as keyboards, remote control units or in our case microcontroller input buttons.