Step 1: Structural basis for the test.
Ethanal ($CH_3CHO$) contains the $CH_3CO-$ unit, which is required for the iodoform reaction. Propanal ($CH_3CH_2CHO$) does not possess this structural feature.
Step 2: Test procedure.
Add $I_2$ and aqueous $NaOH$ (iodoform test conditions) to samples of each compound separately and observe for a precipitate.
Step 3: Observation and conclusion.
Ethanal gives a pale yellow precipitate with a characteristic smell (iodoform, $CHI_3$). Propanal gives no precipitate. This difference in observation clearly distinguishes the two aldehydes using the iodoform test ($I_2/NaOH$).