@PinyaColada said:
How could I know that?
Your computer can and should be running firewall software, and usually the device that connects you to the internet will have a separate firewall. Firewalls are usually configured to let you make requests to the outside world, but to stop any requests made to your computer.
When you use your public ip address, you're making a request as though it came from somewhere outside, so it will be stopped unless you configure the firewalls to allow it. How you do that depends on what hardware and software are in use.
Also, if your computer's ip address isn't the same as your public ip, it means that there's a router or similar device between you and the internet. When you make a request of an outside system (open a web page, for example), the router takes the request and sends it to the web server. When the web server sends information back, the router knows to send it to your computer because you just made the request.
If someone tries to connect to your public ip address from outside (or you use your public ip from inside), the router doesn't know where to send the request. In that case, you'll need to set up some type of forwarding to your computer to allow the connection. How you do that depends on your router.
If you've ever had to set up port forwarding for an internet game, it's a similar situation.