Displacement reactions occur when a more reactive element replaces a less reactive element in a compound. There are two main types of displacement reactions: single displacement reactions, where one element replaces another in a compound, and double displacement reactions, where ionic compounds exchange positive and negative ions to form two new compounds. Examples of single displacement reactions given are magnesium displacing hydrogen in HCl to form MgCl2 and hydrogen gas, and zinc displacing copper in copper sulfate solution to form zinc sulfate and metallic copper. Examples of double displacement reactions forming precipitates are also provided.