Also what does the mAh rating have to do with anything?
It's means milliampere-hours, and is a measure of how much charge the cell can store.
In the simplest of terms, if you started with a fully charged cell rated at 500mAh, it would be able to supply 500mA of current for 1 hour, or 250mA for 2 hours, or 1 amp (1000mA) for a half hour, and so on. It's actually a little more complex than that, because the capacity decreases at higher rates of discharge, so in practice cells are normally specified at a certain discharge rate, often 10 hours.
So a 500mAh cell will supply 50mA of current for 10 hours. At 500mA it would be exhausted in somewhat less than the hour that the mAh figure would suggest, but at, say, 25mA it would last longer than the 20 hours which the figure suggests.
In a nutshell, the bigger the mAh value, the greater the capacity of the cell, and the longer it will last before needing a recharge (but it will also take longer to charge in many cases).
Can the two types be mixed when they are being used or does it have to all be one or another?
Do you mean mixing, say, NiCd and NiMh cells? It's not advisable. The different types have different charge and discharge characteristics, so you should stick to one type for each piece of equipment. It's best to keep the same mAh rating for each cell in the pack as well, as that insures even charge/discharge of the individual cells