For a path connected space $X$, it is simply connected iff any two paths sharing endpoints are homotopically equivalent. Here simple connectivity means it has trivial fundamental group.
I'm doing the if part, so let's suppose $X$ is path connected with equivalence property. Now given $a\in X$, I wish to show $\pi_1(X,a)=1$. Let $f\in\Omega(X,a)$, now if $f$ consists solely of a single point we are happy, if it contains another point say $b\ne a$, then we can split $f$ into two consecutive paths $g,h$ such that $h$ follows $g$ and $f=g*h$ (note: path multiplications are to be read from left to right, unlike ordinary map composites). Now, I have $h=g^-$, so, up to path homotopy, we have $$[f]=[g][h]=[g*g^-]. $$ Now I can't figure out how to show $g*g^-$ is equivalent to the constant path at $a$, although it is intuitively evident. Also for the converse question: if $[g*h]=[c]$ ($c$ means constant path) then how to prove $h\sim g^-$, I completely have no clue either. Intuition doesn't get me anywhere.
Silly as the two questions may look, could anyone enlighten me on them? Best regards to you!
The following should answer your question unless I made a mistake (it's sketchy in a couple places), and is probably a bit overkill but it clarifies some relevant concepts:
Let $X$ be path-connected, let $a,b\in X$, and let $\Omega_{[a,b]}(X)$ denote the space (with the compact-open topology) of continuous paths $\gamma\colon [0,1]\to X$ such that $\gamma(0)=a$ and $\gamma(1)=b$. If $\gamma, \gamma'\in\Omega_{[a,b]}(X)$, then a path in this space from $\gamma$ to $\gamma'$ is nothing more than a "homotopy relative endpoints", that is a continuous function $$H\colon [0,1]\times [0,1]\to X$$ such that $H(t,0)=\gamma(t)$, $H(t,1)=\gamma'(t)$, and $\forall s\ H(0,s)=a$ and $H(1,s)=b$; a homotopy relative endpoints will be denoted $H\colon \gamma\sim_{\{0,1\}}\gamma'$. Define the space of loops based at $a$ as $\Omega_a(X)=\Omega_{[a,a]}(X)$; by definition $\pi_1(X;a)=\pi_0\Omega_a(X)$.
Lemma: for any $a,b\in X$ there is a bijection $\pi_0\Omega_{[a,b]}(X)\cong \pi_0\Omega_a(X)$
Proof: Since $X$ is path connected, we can choose a path $\rho$ in $X$ from $b$ back to $a$. Now define the function $$\rho_*\colon\pi_0\Omega_{[a,b]}(X)\to \pi_0\Omega_a(X)$$ by $\rho_*([\gamma])=[\gamma\cdot\rho]$, where $\cdot$ is concatenation of paths from left to right. Then:
1) It is a standard fact that concatenation of paths is well-defined up to homotopy relative end-points, so $\rho_*$ is a well-defined function.
2) $\rho_*$ is surjective: given a loop $\lambda$ in $X$ based at $a$, it is homotopic relative endpoints to the loop $$\lambda\cdot\rho^{-1}\cdot\rho$$ which represents the homotopy class $\rho_*([\lambda\cdot \rho^{-1}])$.
3) $\rho_*$ is injective: Suppose $\gamma$ and $\gamma'$ are two paths from $a$ to $b$, and suppose there is a homotopy relative endpoints $$H\colon\gamma\cdot\rho\sim_{\{0,1\}}\gamma'\cdot\rho$$ By the definition of path concatenation, if $t\geq\frac{1}{2}$ then $H(t,0)=H(t,1)=\rho(2t-1)$. Subclaim: $H$ can be made into a homotopy $H'\colon \gamma\cdot\rho\sim_{\{0,1\}}\gamma'\cdot\rho$ so that $\forall s$ and $\forall t\geq \frac{1}{2}$ we have $H'(t,s)=\rho(2t-1)$ (I leave it as an exercise to verify this claim because writing down a proof takes a bit of space). Then $H'|_{[0,\frac{1}{2}]\times [0,1]}$ produces a homotopy between $\gamma$ and $\gamma'$ relative endpoints.
Corollary: if $X$ is a path-connected space and $a\in X$, then $\pi_1(X;a)=1$ if and only if for any $b\in X$ and any two paths $\gamma$ and $\gamma'$ from $a$ to $b$, there is a homotopy relative endpoints $H\colon\gamma\sim_{\{0,1\}}\gamma'$.
(Warning: this bijection is NON-canonical. We had to CHOOSE the path $\rho$ from $b$ back to $a$, and non-homotopic choices of $\rho$ give different bijections.)