A public IP address makes a device on a network reachable from any user on the Internet. Any device that needs to be reachable from the Internet must have a unique, public IP address. On the other hand, private IPs are generally assigned to devices such as computer, printer etc. that sit in the local area network (LAN). Private IP addresses are not visible to internet, therefore can’t be reachable from the internet directly, thus minimizing the vulnerability to your internal network.
A network router, sometimes referred to as an internet gateway, is installed in home or office to provide internet access for devices sitting within LAN. It needs a public wide area network (WAN) IP address to connect to its upstream internet provider to provide internet access for those LAN devices.