Summary:
Once you have acquired the Philosophy tech, you may engage in a Research Agreement with another civ. A research agreement costs each side gold (if you don't have the required gold, you can't be part of an agreement).
The Research Agreement lasts 20 turns. After 20 turns you gain research equal to half the average cost of the techs available to you.