In Excel dates and times are digital numbers. Date is integer part of the number and they start from Jan 01, 1900 which is equal to 1 (thus equivalent of Mar 10, 2019 will be the number 43534).
Time is decimal part, 1 hour = 1/24. Thus 6pm = 24/18 = 0.75
Formatting like h:mm is to operate with dates and time in more human friendly manner. Thus if you type 9.15 it is the equivalent of 9 days (integer part) and 3.6 (24*0.15) hours. With General format you see 9.15, with time format