Reaction of metal carbonate with acids
Hydrochloric acid is already dissociated to $\ce{H+}$ and $\ce{Cl-}$

Sodium carbonate as ionic compound dissolves as

$$\ce{Na2CO3(s) &lt;=&gt; 2 Na+(aq) + CO3^2-(aq)}$$

Chloride and sodium ions are in this reaction called the spectator/bystander ions, not being involved in the reaction.

The ongoing reactions are these :

$$\ce{ 2 H+ + CO3^2- &lt;=&gt;&gt; H2CO3 &lt;=&gt;&gt; H2O + CO2(aq)}$$

followed by the dissolution equilibrium:

$$\ce{ CO2(aq) &lt;=&gt; CO2(g)}$$

If solution is lead to crystallization, the spectator ions then meet to form ionic crystals, keeping their charges.

$$\ce{Na+(aq) +  Cl-(aq) &lt;=&gt; NaCl(s)}$$