How Wi-Fi and Ethernet Connect
Wi-Fi is not the Internet. Ethernet is not the Internet. Both are ways to join a local network.

Figure 1. One local network can use Wi-Fi and Ethernet at the same time. Open image source and licence.
Switch or router?

Switch: same local network
Learns which device is on each port and forwards Ethernet frames using MAC addresses. It gives the class more Ethernet ports. It does not normally create the Internet connection.
Figure 2. Classroom-style switch. Open source and licence.
Router: between networks
Forwards IP packets between different networks. The school router or gateway connects the classroom network toward the Internet.
A home Wi-Fi router combines several jobs in one box: router, switch, Wi-Fi access point, DHCP, NAT, and firewall.
Classroom path
COMPUTER → ETHERNET CABLE → CLASS SWITCH → SCHOOL ROUTER/GATEWAY → INTERNET SERVICE
- Access point: provides the Wi-Fi radio link.
- DHCP: gives a device local network settings.
- DNS: translates a name such as
example.orginto an IP address. - Modem or ONT: connects a customer network to cable, DSL, fibre, or another provider link.
Quick check: if Wi-Fi connects but websites do not load, test local IP settings, gateway reachability, DNS, and Internet service separately.