Mass Effect and Mass Effect 2
Mass relays are feats of Prothean engineering advanced far beyond the technology of any living species. They are enormous structures scattered throughout the stars, and can create corridors of virtually mass-free space allowing instantaneous transit between locations separated by years or even centuries of travel using conventional FTL drives.
Primary mass relays can propel ships thousands of light years, often from one spiral arm of the galaxy to another. However, they have fixed one-to-one connections: a primary relay connects to one other primary relay, and nowhere else. Secondary relays can only propel ships a few hundred light years, however they are omnidirectional: a secondary relay can send a ship to any other relay within its limited range.
There are many dormant primary relays whose corresponding twins have not yet been located. These are left inactive until their partner is charted, as established civilizations are unwilling to blindly open a passage that might connect them to a hostile species.
Mass Effect 3
Once believed to be of Prothean origin, mass relays were in fact created by the Reapers using technology far beyond that of other living species. The enormous structures, scattered throughout the stars, create corridors of virtually mass-free space. This allows instantaneous transit between locations normally separated by years or even centuries using conventional FTL drives.
Primary mass relays can propel ships thousands of light-years. The flight path, however, is fixed to a single relay elsewhere in the galaxy. By contrast, secondary relays, while only capable of propelling ships a few hundred light-years, can reach any other relay within their limited range.
Many primary relays lie dormant, their destinations not yet known. These relays are often left inactive on purpose, as established civilizations are unwilling to blindly open a passage that might connect them to a new, hostile species. The Reapers do not share the same concern, and freely use the dormant relays.