The value of beats in each measure is defined by the Time Signature. In the example below we have a 4/4 time signature.
The number four on top indicates how many notes are in the bar, while the bottom four lets you know which type of note is used, in this case the 4 equals a quarter note. So each bar will contain four quarter notes.
If the number 2 were on the bottom it would equal half notes and an 8 would equal eighth notes.
A measure can be broken up in many different ways depending on the musical effect you want to achieve.
In most cases a song will stick to one time signature all the way through. However it is not uncommon for classical music, world music and progressive rock to change time signatures many times throughout a piece, even from measure to measure.
Below are the two most common time signatures you will encounter.