Quid pro quo is a Latin term that means "something for something," or "what for what." It refers to something being exchanged for something else of equal value.
In the context of the law, contracts need a quid pro quo arrangement in order to be formed. Also, sexual harassment lawsuits often involve an employer attempting to create a quid pro quo situation, where an employee is only rewarded, hired, etc. if he or she exchanges sexual favors.
Quid pro quo can refer to both legal situations where value is being exchanged for value, or illegal situations where value is being exchanged for value. Another example of an illegal situation involving quid pro quo would be if a politician promises to treat campaign donors in a favorable way not permitted by the law, if they give a certain amount of money to the campaign. So, essentially, the individual situation determines whether or not quid pro quo is being used legally or illegally.