Let $A\subset X.$We say that $A$ is a retract of $X$ if there exists a continuous map $r:A\rightarrow X$ such that $r(a)=a \forall a\in A$.The map $r$ is called the retraction map.
Now , If $\iota:A\rightarrow X$ is the inclusion map, then the condition $ r(a)=a,$ for all $a\in A$ is equivalent to saying that $r\circ \iota=I_{A}$.
How to conclude from the above two facts that-
$A$ is a retract of $X$ iff the inclusion map $\iota $ has the left inverse.?
It's a reformulation of the definition.
Suppose that $\iota: A \to X$ has a (continuous) left inverse, say $r: X \to A$ with $r \circ \iota = \textrm{id}_A$. Then for all $a \in A$: $$a= \textrm{id}_A(a) = (r \circ \iota)(a) = r(\iota(a)) = r(a)$$
so that $r$ is the identity on $A$. So $r$ is a retraction map according to the definition.
And if $r$ is a retraction, the same equations say again that $r$ is a left inverse.