Basically, Pokémon each have three ability slots
Slot 1
Slot 2
Slot Hidden
As of Black & White, Slot Hidden could be obtained through Dream World, Events and now Hidden Hollows. If the mother has it, there's a 60% chance of the baby having it.
However, now, if the mother has Slot 1 ability, the baby will have an 80% chance of Slot 1 ability and 20% chance of Slot 2.
If you want to just get the other ability and then use that to breed, throw Ditto in and it's back to 50/50.
For Pokémon who only have one ability, both their Slot 1 & Slot 2 abilities will be that ability. For example, Pikachu has Static as Slot 1 and Slot 2. This is noteworthy because multiple Pokémon begin with different abilities in Slot 1 and 2 (Eevee with Run Away & Adaptability and Trapinch with Hyper Cutter & Arena Trap) while their evolution has the same ability in both slots (Vaporeon with Water Absorb, Vibrava with Levitate).
However, there are some Pokémon who have different abilities as they evolve. Take Venonat/Venomoth for example.
Venonat has CompoundEyes (Slot 1) and Tinted Lens (Slot 2). Venomoth has Shield Dust (Slot 1) and Tinted Lens (Slot 2). If you were breeding a female Venomoth with Shield Dust, then the baby Venonat has got an 80% chance of hatching with Compoundeyes
It works the same way with the Hidden Ability. If the Pokémon doesn't have a unique Hidden Ability, then the ability it has in its Hidden Slot is the same. Trapinch has got a Hidden Ability (Sheer Force) but Vibrava doesn't. It's the same with Giratina and the Therians. Giratina's Altered Forme has got Pressure in Slot 1 & 2 and Telepathy in Hidden while Origin Forme has Levitate in all three. Tornadus Incarnatehas Prankster in Slot 1 & 2 and Defiant in Hidden, but Therian Forme has got Regenerator in all three slots