Two Different Roads to the Internet
When your phone is online, the data getting in and out of it is taking one of two very different routes. One route is short — a hop to a box sitting somewhere in the same building as you. The other route is much longer — a link to a tall tower belonging to a phone company, sometimes kilometers away. Both ways feel identical when you are scrolling, but the technology behind them is completely separate, and so are the rules about what they cost and where they work.
Wi-Fi: A Local Conversation
Wi-Fi connects your device to a nearby router. The router is the small box that brings the internet into your home or office, often through a cable from a provider. The phone or laptop talks to the router using short-range radio waves. Range is limited to a single building or thereabouts, which is why the signal weakens in the back room and dies at the end of the garden. The router does the heavy lifting of actually reaching the internet; your device is just on the local side of that link.
Mobile Data: A Connection to the Cell Network
Mobile data uses a completely different network: the cellular network run by a phone carrier. Tall towers scattered across cities and along roads send and receive radio signals over much greater distances. Your phone keeps a connection to whichever tower is closest, and the carrier's network routes that connection out to the internet. Because the network is built to cover wide areas, mobile data works in places where there is no router at all — on the street, on a train, on a country road.
Where the Practical Differences Show Up
The two also tend to be paid for in different ways. Home Wi-Fi is usually a flat monthly bill for the internet line, and you can use as much as you want without it costing more. Mobile data is typically part of a phone plan with a monthly allowance, so heavy use — long video streams, big downloads — can chip away at that allowance or trigger extra charges. That is why phones are designed to prefer Wi-Fi when it is available: the connection is local, often faster, and it does not eat into the data plan.
Source
This article was written using information from Wikipedia.