I am having trouble understanding the idea of an element of a homotopy group. This is the definition from wikipedia:
In the n-sphere $S^{n}$ we choose a base point $a$. For a space $X$ with base point $b$, we define $\pi _{n}(X)$ to be the set of homotopy classes of maps $f:S^{n}\to X$ that map the base point a to the base point b. In particular, the equivalence classes are given by homotopies that are constant on the basepoint of the sphere.
So to my understanding $\pi_n(X)$ is created by taking all continuous map $f: S^n \rightarrow X$ such that $f(a) = b$ and then mod this under the homotopy equivalence relation. However, I do not understand the last sentence: the equivalence classes are given by homotopies that are constant on the basepoint of the sphere. What does it mean to be constant on the basepoint of the sphere? If $f$ and $g$ are homotopic, why must they be constant on the basepoint of the sphere?
To say the homotopy $F:S^n\times[0,1]\rightarrow X$ from $f$ to $g$ is constant on the basepoint of the sphere means that $F(a,t)=b\,\,\,\forall t\in[0,1]$, where $a$ is the chosen basepoint of the sphere and $b=f(a)=g(a)$ is the chosen basepoint of $X$.
A general homotopy needn't be constant on the basepoint of the sphere. For example, identifying $S^1$ with $\{z\in\mathbb{C}|1=|z|\}$, let $X=S^1$ and $1$ be the basepoint for $S^1$.
Let $f,g:S^1\rightarrow X=id_{S^1}$. So we have $1=a=b$ in the context of the definition you gave. Let $F:S^1\times[0,1]\rightarrow X;F(z,t)=e^{2i\pi t}z$.
Then clearly $f\simeq_Fg$, but $F(a,\frac{1}{2})=F(1,\frac{1}{2})=-1\neq1=b$.