It is an example of intramolecular aldol condensation. α - hydrogen atom of one - CHO group gets abstracted by NaOH form enolate ion which then attacks =C=O another −CHO group to form aldol or β - hydroxy aldehyde. The aldol on heating C2H5OH∕H2O forms the final product ( α,β-unsaturated aldehyde) as the major product. Mechanism