Well, there are several ways. You could have a character look at a clock or their watch and say the time aloud. Another option is to describe the position of the sun or the stars to imply the time of day. Also, you could mention specific events that are known to happen at certain times, like 'The school bell rang, marking the end of the day at 4 PM.'
You can describe it explicitly, like 'It was 3 o'clock in the afternoon.' Or mention it indirectly through characters' activities or the environment, such as 'The sun was setting, indicating it was late evening.'
To show the time in fiction, you could incorporate time-related objects like alarm clocks or calendars. Or you could use sensory details like the smell of dinner cooking, which might suggest it's dinnertime. Sometimes, you can just have a character mention that they have to be somewhere at a particular time.