Your public IP address is the IP address used by the outside world to talk to your network, but it’s not going to be what the IP is to other computers within your local network - that will likely be 10 + something, or 192 + something. (192.168.1.xx is common)
Ping is just a command you type from a terminal, like this: ping 165.49.6.76