Imagine you have a bunch of toys in different colors, shapes and sizes. The Hilbert function is like counting how many toys you have in each group, but in a special way. First, you count how many toys you have of the smallest size in each group. Then, you count how many toys you have of the next bigger size, but only the ones that don't belong to the previous group. You continue doing this for each size until you count all the toys.
For example, if you had 3 red balls, 2 blue balls, and 1 green ball, the Hilbert function would be (1,1,1,0,0,0...), which means you have 1 toy of the smallest size in each group (1 red ball, 1 blue ball, 1 green ball), and 0 toys of any bigger size.
This concept is often used in algebraic geometry to talk about the size and structure of geometric objects called varieties. By looking at the Hilbert function of a variety, you can learn things like how many points it has and how those points are arranged in space.