Double replacement reaction occurs when the cations and anions of two ionic compounds are exchanged. The figure below clearly illustrates how this swap takes place.
When the chemical formula for each ionic compounds is written correctly, you can balance the equation like any other chemical equations by making sure the number of atoms for each element is the same on the left and the right.
If you are interested in a "simplified" way of balancing double replacement reaction, you can balance "A", "B", "C" and "D", meaning, handling the cations and anions as a group, rather than as individual elements.
To illustrate, here's an example of a double displacement reaction:
#NaOH + FeCl_2 -> Fe(OH)_2 + NaCl#
The groups of ions are:
A = Na
B = OH
C = Fe
D = Cl
Now, we'll count the number of each groups on both sides:
Left - Group - Right
1 - A (Na) - 1
1 - B (OH) - 2
1 - C (Fe) - 1
2 - D (Cl) - 1
Looks like OH and Cl are not balanced. We'll need to place a
#color(red)2# in front of NaOH (on the left) and #color(red)2# in front of NaCl (on the right).
#color(red) 2 NaOH + FeCl_2 -> Fe(OH)_2 + color(red) 2 NaCl#
Including the physical states:
#2 NaOH"(aq)" + FeCl_2"(aq)" -> Fe(OH)_2"(s)" + 2 NaCl"(aq)"#