The first thing you want to do is look at the datasheet for your IC. These can be found online by simply typing in the IC code, for example a low-powered NOT gate is 74LS04, then the word "datasheet". There will be a section of maximum and minimum voltages. If you're lucky your batteries will be within this range, but most of the time it will fall outside. A pretty common operating range is 4.5 - 5.5 V. Whilst you can go ahead and put in 3 x AA batteries, to make 4.5 V, that would only power the circuit for a short time before it falls out of the threshold range (remember, batteries lose voltage as they are used). It is much better to go over the threshold range and use a voltage divider or clamp diodes to keep the voltage within the operating range.
Voltage dividers consist of two resistors. The voltage in to the IC is taken from the middle connection of the two resistors and the ground is, well, the ground. This means that the IC is in parallel to the second resistor, meaning that its voltage has to be the same as the voltage on that resistor.
Because the voltage over series components is divided up (similar to currents in parallel), only a certain fraction of the total voltage exists at R2. This voltage can be calculated by Vs * R2/(R1+R2), or the supply voltage multiplied by R2 over the total resistance. In the circuit above, Vout would be equal to half of Vs.
So, if you had a 9 V battery and a IC which ran at 5 V, you could have R1 as 4k and R2 as 5k.
5/9 * 9 = 5 V
Simple enough, but there is one major issue. What happens when the voltage of the battery drops? Say, down to 8 V...
5/9 * 8 = 4.44 V
After a drop of 1 V, this voltage divider cannot be used. Seems a waste of a perfectly good battery, no? This is where the magic of zener diodes come in. Simply replace R2 with a zener diode with a voltage within the operating range in reverse bias, and the circuit will work until the voltage of the battery drops below the zener diode's operating voltage. So, if you have a 5.1 V zener diode, your IC will run until the battery loses 3.9 V. Much better. R1 can be any value you wish but it has to be there to drop the left over voltage. It does help limit the current, so chose a value that suits your needs.