How do you share files with an IP address?

Someone tried to share a file with me, but I am not able to view any files when I enter my co-worker's IP address as the host. What are we doing wrong? I also tried to share a file with someone in another office and the other person could not open the file.