You need to put in a SIM card from a mobile service provider which has a contract or PAYG deal including data. If you mean how to do this for free then the answer is (AFAIK) you can't. But if you can connect to a free wi-fi hotspot such as are commonly available in the likes of coffee shops then you can use that for free (not sure if you still need a SIM card of some kind for this to work).