The top number tells us how many beats there are in a measure; this is also the meter. The bottom number tells us what note values comprise the beat.
In the above example the top number is 3: This tells us that there are 3 beats in a measure. The bottom number tells us that the quarter-note gets the beat.