Hydrogen chloride is a colorless gas with a pungent odor. The substance is contained therein as molecules $(HCl)$.
Dissolved in water, it is in the form of a colorless solution called hydrochloric acid . During dissolution the substance was split into hydrogen and chloride ions: $HCl(g)$ $\longrightarrow$ $H^+$ $+$ $Cl^-$
Pure sodium hydroxide is a white solid. The substance is contained therein as ions associated to an ionic network $(Na^+OH^-)$.
Dissolved in water, it is in the form of a colorless solution called caustic soda During dissolution the substance releases into water sodium and hydroxide ions. $Na^+OH^-(s)$ $\longrightarrow$ $Na^+$ $+$ $OH^-$