How to Know If Someone Entering Your Computer When You're Online

To know if someone entering (hacking) your computer when you are online, is with her/his Ip Address.
In windows To know what's an IP address that entering your computer :
Go to Start --> RUN --> type CMD (to go to command prompt page) , click OK
Then type  netstat  -an  press Enter key