Yep need a managed switch, but you also need a router that can handle vlans, for inter vlan routing.
My setup at home is pfsense with two Dell 24 port managed switches and several vlans. Pfsense has various rules for what can/can't access what from/on each vlan. It's quite configurable so you can isolate risk from different parts of the network. Ex: Wifi is on it's own vlan and can only access the servers that I need from my phone. So if my wifi gets hacked access to the rest of stuff is limited. I also have a vlan for internet facing stuff like my game server, so if that gets hacked, they don't get access to the rest of my network etc...
You can think of vlans as being a "sub switch" and at the router level each vlan is a virtual interface to connect those switches.
There are some specific details and terminology to know such as vlan tagging but I will leave that as an exercise to the reader as this sounds very homeworkish.
