Welcome to the forums, thanks for posting.
There are a few ways to find out who attacked you.
1. Your 'Event History' will pop-up when you log-in if someone has attacked you.
2. Click on your Town Hall, go to the 'News' tab, then click on 'Event History'.
3. Click on your name in the upper-left corner, go to the 'News' tab, then click on 'Event History'.
As far as I know, there is no similar way to view who you have attacked. But you can see people who you have attacked (or supported) in the past 24 hours by the timers in the neighbourhood bar.
Hope this helps. Enjoy the game!