A switch would be useful in a scenario where you have multiple devices that need to connect to the network via a wired connection (or if not required, at least where desirable).
For example, I have multiple computers in my room that need to connect via a wired connection for speed purposes. Rather than running multiple cables all the way out to my router, I can run one cable from the router to a switch that sits in a more convenient location for those devices. I can connect them to the switch with shorter cables, reducing clutter, and giving me less things to trip over lol.
It would also be useful for network traffic control. If you have a few devices that need to share lots of data between them, but don't want to tie up the rest of the network, you can use a switch to achieve this. The data shared between devices conencted to the switch will not affect the performance elsewhere on the network because the data stays local.
In this example, if you have 2 PC's connected to the switch, data being moved from PC 1, to PC 2 will flow from PC 1, to the switch, and then directly to PC 2. It will not flow from PC 1, to the switch, back out to the main router, back to the switch, and then to PC 2.