Why does a faction have 3 leaders, do they give special powers? After some reading I didn't find anything useful. I also don't know why I'm getting attacked when I'm in federal territory.
As of Elite: Dangerous 1.3, players can pledge themselves to a galactic power of their choice. The galactic powers are smaller in scale than the galactic superpowers, and are often parts of the government of a superpower, but not always. For example, Felicia Winters is the Shadow President of the Federation.
In addition to advancing the political agendas of your favorite political figure of the Milky Way, players recieve some rewards for participating in powerplay. For example, players pledged to Emperor Arissa Lavigny Duval recieve a bonus to bounty payout, and can purchase a burst railgun module at rank 3.
There is a cost to participating in powerplay, however: you are marked as being pledged to that power. So if you're pledged to the Emperor, and find yourself in Federation space, you will be marked as an enemy, and anyone will be allowed to interdict and attack you without receiving a bounty. This works the other way around, though: if you are in exploited space, and see an enemy ship, you are allowed to interdict and destroy them without consequence.
For more information about all of the powers, check out the Elite: Dangerous Wiki.