cURL is a method to send/receive requests to 3rd party web applications.
You can login to your facebook.com account and fetch list of all of your friends photos by using cURL.
Step 1: Mention target url to curl init
Step 2: Send username and password in post vars attriubute
Step 3: curl will respond with a HTML output of facebook page that looks after you logged in.
Main purpose of curl is to connect/send data to other websites and download their output data.