If a straight line stands on a straight line, then it makes either two right angles or angles whose sum equals two right angles.
Let CD stand on line AB at point C.
If angle DCA = angle DCB, both are right angles.
Otherwise, draw CE perpendicular to AB.
Angles DCA + DCB = angles ECA + ECB = two right angles.