The mean is all of the numbers in a data set, divided by the number of numbers. Another word for mean is average.
The median is the middle number in an ordered set of numbers. If there is an even number of numbers (ie. 4), then take the two middle numbers, and divide them by 2.
Both calculations are meant to find the number that represents the data set (and the range of ts numbers) the best.
The mean (or average) in this case is: 18 + 24 + 19 + 16 + 21 / 5 = 19.6
The median in this case is: {16, 18, 19, 21, 24} = 19