Magicka is the energy used to cast spells. Your total Magicka is determined by multiplying your Intelligence by your base Magicka Multiplier, which is 1 by default. Fortify Maximum Magicka effects from Races or Birthsigns can increase this multiplier. You can also increase your Magicka pool by using items with a Fortify Magicka or Fortify Intelligence effect. Your total Magicka is shown in the blue bar in the bottom left corner, as seen on the right. Every spell has a casting cost, which is dependent on the base cost of the spell's magic effects and the magnitude and duration of these effects. Every time you cast a spell, whether you succeed or fail, the casting cost is deducted from your total Magicka pool. Your chance to successfully cast a spell is calculated based on a number of factors, including the magicka cost of the spell, your skill in the relevant spell school, and your Willpower—see here for the complete formula.
You can replenish your Magicka by using potions or scrolls with Restore Magicka, or by resting. (Those born under The Atronach birthsign do not gain Magicka by resting.) When resting you will replenish 0.15 × Intelligence points of Magicka per hour. Alternatively, you can use Spell Absorption effects, which will absorb power from incoming offensive spells and replenish your Magicka instead. Finally, you can use Absorb Magicka effects to steal Magicka points from your opponents (which has the added benefit of limiting their spellcasting ability as well).