Our earth completes one rotation on its axis in almost 24 hours. Due to this rotation, we can see sun rise, change its position during the day and finally sun set.
The time between one sunrise and the next is called one day. This concept can be used to measure time.