The DAY function extracts the day from a valid date.
In simple words, it returns day from a date ignoring month and year. The number of the day ranging from 1 to 31 from a date you have mentioned.
In the below example, we have used DAY function to simply get day from a date.
And in the below example, we have used DAY with TODAY to create a dynamic formula which returns current day number and it will update every time you open your worksheet or when you recalculate your worksheet.
This function is from the list of top 100 functions with examples and from here you can also learn some useful formulas.