make a point of figuring out what it is that gets you attacked. you have to understand that or you get wiped out before you have a chance to figure out the ropes.
planets close to opponent planets = influence war -> outright war
weaker military = easy prey -> ouch
warships(especially troop transports) near opponent planet = eminent threat -> preemptive strike sooner or later
low diplomacy = degrading relationship -> eventual war(and bad trading in meantime)
different philosophy(allignment) = intolerance -> get off my lawn!
mil or influence starbases in their territory = naked agression -> get the @#%& off my lawn!!!!!!
simular philosophy = domestic harmony -> improving relationship
trade routes = economic dependancy -> good pal o' mine
stronger military = fear/respect -> peace (and eventualy fruit baskets)
stronger diplomacy = love/respect -> christmas cards
make special note of the trade route thing, this one is not so obvious to new players. tossing lots of freighters their direction is a great way to shore up a relationship with an ai you don't want to get into a war with(not foolproof tho).
allowing the ai to colonize the little planets in your territory may be great once you know the ropes but early on it can ammount to big trouble. concider throwing colony ships with few colonists at these just to keep your borders nice and clean.
there are other things i haven't mentioned(and prob a few i forgot) but they are more of mid/late game issues. hope this helps you get over the hump