Our earth rotates on its own axis. Due to this rotation, different parts of the earth receive different amounts of sunlight, thus causing morning, noon, evening and night.
Now, if we had one time zone, then 12 pm would be noon at some places, but it would be night or evening at other places which would be inconvenient. Hence, scientists made different time zones according to the earth's rotation with respect to the sun.
Do you know how?
The earth makes one full 360 degrees rotation in 24 hours. This means in one hour, the earth moves by 15 degrees. Using this information, scientist divided the planet into 24 sections or time zones. Each section or region was about 15 degrees wide and had a specific standard time. This helped us know the proper time of the day in that part of the earth.
*from description on linked page