It All Depends on the Resulting Product
The output from a double displacement reaction is either a gas, precipitate, or water. However, one point to be noted here is that if all the reactants and products happen to be in the aqueous form, then it is not considered as a double displacement reaction.
Chemical reactions are broadly classified into four types, viz., synthesis, decomposition, single displacement, and double displacement. Two elements combining to form a compound is called synthesis. A compound breaking down into its elements is decomposition. When an element of a compound is displaced by another compound, the reaction is called a single displacement reaction.

On the other hand, when elements of two compounds are interchanged between each other, the reaction is a double displacement reaction. These reactions include neutralization, precipitation, and reactions whose products are gases. On this note, we give you the detailed definition of double displacement reactions along with their examples.
Definition of Double Displacement Reaction
Each reaction has reactants that react with each other to form compounds called products. In most cases, the reactants are compounds. Each of the reacting compound lends one molecule/compound for exchange with the molecule/compound offered by the other compound. Anions and cations of compounds change their placement to react and form altogether different compounds. This type of reaction is also called metasynthesis or double replacement.

The standard representation of this type of equation is as given below:

UV + XY ➜ UY + XV
This equation can be represented in terms of the ionic charges as follows:

U+V- + X+Y -➜ U+Y- + X+V-
Let us understand the features of this type of reaction with a chemical equation in which silver nitrate reacts with sodium chloride to form the resultant products―sodium nitrate and silver chloride.

AgNO3 + NaCl ➜ NaNO3 + AgCl
▶ In the standard representation, U, V, X, and Y represent a compound or an element. In the given example, AgNO3 comprises silver and nitrate. Nitrate, in turn, is a compound of nitrogen and oxygen. NaCl contains only two elements, sodium and chlorine.

▶ The reactants or the compounds reacting with each other are ionic in nature. In the given example, Cl- and NO3- are negative ions.

▶ They interchange elements with each other. Silver nitrate gives away NO3- and sodium chloride gives away Cl-. These ions are interchanged by the two compounds, thus forming sodium nitrate and silver chloride.

▶ Here, we can observe the fact that silver nitrate is a compound containing three elements. The entire NO3- ion gets attached to the sodium atom.

In most of the cases, the reactants of these equations are in the aqueous form. However, the product may be a precipitate, gas, or a liquid. If the product obtained is in the gaseous or solid form, it becomes easier to separate it.
Examples of Double Displacement Reactions
Precipitation Reactions
Here, two compounds react with each other to form a solid in case the maximum solubility of the solution is reached.
Pb(NO3)2 (aq) + 2NaI (aq) ➜ PbI2 (s) + 2NaNO3 (aq)

In this reaction, lead nitrate reacts with sodium iodide to form lead iodide and sodium nitrate. Lead iodide is the precipitate in this case.
BaCl2 (aq) + CuSO4 (aq) ➜ BaSO4 (s) + CuCl2 (aq)

In the case of above reaction, barium chloride reacts with copper sulfate. The resultant consists of two compounds: barium sulfate and copper chloride. Barium sulfate is in the solid form, and, thus, called a precipitate.
Na2SO4 (aq) + 2BaCl (aq) ➜ Ba2SO4 (s) + 2Nacl (aq)

In this reaction, sodium sulfate reacts with barium chloride. The products formed are barium sulfate and sodium chloride. Barium sulfate is in the solid state.
Neutralization Reactions
When an acid reacts with a base, the resulting product is salt and water. This reaction is called neutralization reaction.
MgS (s) + 2HCI (aq) ➜ MgCl2 (s) + H2S (g)

In the above reaction, sulfur from magnesium sulfide replaces chlorine from hydrochloric acid. The resulting compounds formed are magnesium chloride and hydrogen sulfide.
NaOH (aq) + HCl (aq) ➜ NaCl (aq) + H2O (aq)

Consider the reaction above in which sodium hydroxide reacts with hydrochloric acid. The resulting products are sodium chloride and water. This is a special type of a reaction because both the reactants are corrosive, whereas the products are non-corrosive.
Reactions Forming Gaseous Product
The reaction in which a salt reacts with an acid, the resulting product is in the gaseous form.
Na2CO3 (aq) + 2 HCl (aq) ➜ 2NaCl (aq) + H2O (l) + CO2 (g)

In this case, sodium carbonate reacts with hydrochloric acid. The resulting compounds produced are sodium chloride, water, and carbon dioxide (which is a gas).
NH4OH (aq) ➜ NH3 (g) + H2O (l)

In this reaction, two hydrogen atoms react with an oxygen atom to form a water molecule. The remaining molecules of ammonium hydroxide are given out as ammonia, which is a gas.
Na2S (aq) + 2 HCl (aq) ➜ H2S (g) + 2NaCl (aq)

In the above reaction, sodium sulfide reacts with hydrochloric acid. The resulting products are hydrogen sulfide gas and sodium chloride.
A simple real-life example of this concept can be of a dance party. People switch to a new dancing partner after some time during the party. Similarly, in this type of reaction, anions and cations of two reacting compounds exchange their places after the reaction happens. To summarize the concept of a double displacement reaction briefly, it can be said that two compounds exchange their component elements to form two new compounds.