Both are very similar. However, a layover can last from half an hour or less to 24 hours and beyond, whereas on a connecting flight, you will find yourself running for the gate.