The $\alpha$ -hydrogen atoms of acetaldehyde due to $-E$ effect of $ > C = O$ group is slightly acidic in nature. In crossed aldol condensation between formaldehyde and acetaldehdye in the first step $OH^-$ ion (from the base added) abstracts one of these acidic $\alpha$ -hydrogens to form carbanion or enolate ion which is stabilised by resonance.