In order to raise your standing with another faction you can offer them gifts of credits or resources, offer them missions or fullfill them and use envoy cruisers to visit their planets.
If you are playing in free teams you wil need to start with gifts and missions. Both need to be researched first from the diplomacy research tab and can be executed in the diplmacy window of the player you want to pact with. You usually need a positive standing of three to five to request a cease fire if I recall correctly
After getting the ceasefire with the other player send four envoys (if bott of you are TEC ar Advent)/five envoys (if either of you is Vasari), each to one of his planets (more than one envoy per planet is useless). Depending on what faction you play you should take a look at the abilites an envoy has and place them accordingly on your allies planet (an envoy that speeds up population growth should be positioned on a high population world, one that prevents bombing damage on frontline or vulnerable ones).
Once you have a full alliance (relationship needed is ten I think) you can share pacts, but every pact needs more relationship than the previous one. Last pacts take 18 (Advent, TEC)/20 (Vasari) standing, thus the number of envoys needed. NOTE: Both sides need that much standing in order to offer a pact. If you have a standing of 18 but your ally only has 15 you can only offer pacts up to his standing level and vice versa.