A network switch is an OSI level 2 network device. As such, it is not aware of TCP/IP, and will work for protocols including ICMP (used for pinging). Essentally, network nodes connected to a network switch are similar to connected to a physical multi-drop network.
In the context of this module, it is important to note that because a switch is a level 2 device, it can only be used to connect network nodes of the same TCP/IP subnet. To connect different subnets, you will need to use a router.