Why is this mapping not contractible? We define the relative homotopy for a pair $(X,A)$ to be the homotopy classes of continuous maps 
$$(D^n, S^{n-1},s_0) \to (X,A,x_0)$$
This is technically a continuous map from $D^n \to X$ with the specifications that $S^{n-1} \to A$. 
Any continuous mapping $D^n \to X$ is contractible so I am not sure why this specification on the subspace $S^{n-1}$ results in such maps not necessarily being contractible. 
Why is a continuous map $(D^n, S^{n-1},s_0) \to (X,A,x_0)$ not necessarily contractible? 
We are often told when they are contractible, i.e when $S^{n-1} \to A$ extends to a map on $D^n$.  However, I have never really understood why these maps aren't contractible to begin with. 
 A: First, a point of terminology: a map is not said to be contractible (this is a property of spaces), it is said to be nullhomotopic.
Now, when looking at relative homotopy groups, two maps $f,g : (D^n, S^{n-1}, s_0) \to (X,A,x_0)$ are identified if they are homotopic relatively to $A$ (in short, "rel $A$"). This means that there must exist a homotopy $H : D^n \times I \to X$ such that all the following conditions hold:


*

*$H(x,0) = f(x)$ and $H(x,1) = g(x)$;

*For all $x \in S^{n-1}$ and for all $t$, $H(x,t) \in A$;

*And for all $t$, $H(s_0, t) = x_0$.


It is true that, since $D^n$ is contractible, there will always exist a map satisfying the first condition. But it may or may not satisfy the other two; if it does, great the two maps are homotopic rel $A$, but otherwise they may not be. In particular, note that this implies that the two restrictions $f_{| S^{n-1}}, g_{| S^{n-1}} : S^{n-1} \to A$ have to be homotopic, which isn't always true.
To give an explicit example, consider the case where $A = \{x_0\}$. Then you're looking at maps $f : D^n \to A$ such that $f(\partial D^n) = \{x_0\}$, and two such maps are identified when there's a homotopy which is constant on $\partial D^n = S^{n-1}$. This is of course exactly the definition of the homotopy group $\pi_n(X,x_0)$, and you know that these aren't always trivial.
Even when $A$ is bigger than a singleton this may not be trivial. Stefan Hamcke gives an example in the comments: consider the identity of $(D^n, S^{n-1}, s_0)$. If the identity were nullhomotopic rel $S^{n-1}$, this would imply that the identity of $S^{n-1}$ would be nullhomotopic, which is not true for degree reasons.
