Clearly a closed and bounded interval is compact and connected.
Conversely, if a set is connected, then it is an interval, meaning it is a set $I$ with the following property: for all $x,y \in I$, if $x < z
Clearly a closed and bounded interval is compact and connected.
Conversely, if a set is connected, then it is an interval, meaning it is a set $I$ with the following property: for all $x,y \in I$, if $x < z