To invade one of your friends Empires, just click on their name in your Neighbor Bar, click "Invade," and once you arrive at their Empire, choose a location to attack. The location of attack is important for two reasons: 1. the structures you attack directly effect your rewards like resources and coins--choose depending on your needs, and 2. some areas on your friend's map might be better-defended than others, so take advantage of that.
Don't worry, you do have the option to fight back when invaded. The process for defending your Empire is nearly identical, but the rewards are far more lucrative for a successful defense. Though, you won't exactly be prepared for what troops they've chosen, so it's best to create a large, varied force of units to defend yourself with. If you fail to defend yourself from an invasion, that player will be able to collect rewards from that invaded location every few hours until you do, so bite them back.
While you will receive bonuses for successfully attacking a friend, you will not lose anything for being invaded by a friend from the locations they attack. In other words, those rewards aren't stolen, but created out of thin air. (Ah, technology.) The same goes for rewards collected by invaded, undefended Empires. However, there is one thing to lose while in combat: units. Losing a Tank or a squad of Infantry in battle means that you will not be able to bring them onto the battlefield again. Therefore, it's a good idea to keep building units and maintain a nice balance of Air, Naval and Infantry units.
If you want protection from invasion while you, say, sleep or go for a good old vacay, you can opt to go neutral for a minimum of 18 hours, which will prevent players from invading your Empire. However, going neutral will erase your current occupations and you'll have to start all over. But hey, there's no need to be a wuss--this is Empires & Allies, and staking your claim is half the battle.