There is a 'Friends' icon at the bottom left corner of the screen: click on it to open the list of your friends. There you will be able to visit each of them by clicking on the 'Visit' button.
For visiting your friend's base you receive +10 coins for each click on a structure that requires repair or speeding the extraction/production time. Having 5 buildings repaired/sped up, you receive +100 coins and +1 point of energy. You can repair or speed up the total of 5 structures for each friend per day.
An ally can also send you some of the items, if you ask for them: Contracts, +10 Energy or items required for the events. To ask a friend for a Contract, click the Underwater Crystal Field or the Underwater Harvester and click the 'Ask friends' button. You can ask for energy only when its count is near zero.