A UPI switch is the system inside a bank that receives every UPI payment request for that bank and answers it. Every bank that offers UPI needs one. Some banks build their own switch. Others use a switch that a software company builds and runs for them.
UPI connects hundreds of banks through NPCI, the organisation that runs UPI. NPCI does not hold anyone's money. It only passes requests between banks. Each bank's UPI switch is the point where those requests enter and leave the bank.
Imagine you pay a ₹850 medicine bill at a chemist's shop in Dehradun with your UPI payment app. The app sends your request to NPCI. NPCI sends a debit request to your bank's UPI switch. The switch checks your UPI PIN. It asks the bank's core banking system whether you have ₹850 in your account, and asks the core to debit it. Then it replies to NPCI that the debit is done. NPCI now sends a credit request to the chemist's bank. That bank's UPI switch tells its own core to credit ₹850 to the chemist's account. The soundbox on the counter then announces the payment. The whole exchange takes a few seconds.
The hard part is the number of payments. India makes hundreds of millions of UPI payments every day, and the number rises sharply during festival sales. A large bank's switch must answer thousands of requests every second, every hour of the day. If the switch is slow or stops working, payments fail. NPCI tracks how many payments each bank fails for technical reasons. So banks spend a lot of engineering effort on keeping their switch fast and always running.
The UPI switch is a part of the bank's payment hub. It also handles newer kinds of UPI payment. With a credit line on UPI, the switch takes the ₹850 from a credit line instead of from a savings account.