Your modem will only hand out one IP address. A switch does not hand out IPs. It only transfers packets to the correct computer.
A router will use that one IP address for itself. It will then hand out its own IPs to what ever networkable components are on the network. The router will enable each component to talk to the other components and let each component access the internet.
Long answer compared to Grumpy's answer.