How to receive data from the server

I want to connect to the server, and receives data from the server, what function should be use, thank you!

Hello, what server do you want to connect to? A third party server, dedicated server?