I'm having problems with understanding why is it the case. Suppose $D\subset\mathbb{R}^n$ is an open, connected subset and for $p\in D$ define the tangent space $T_pD$ to be the set of the velocities of all curves $(-\epsilon,\epsilon)\to D$ which pass through $p$. The lecture notes I've got claim that for any $p$ $$ T_PD\cong \mathbb{R}^n $$ The proof goes as follows: let $c:I \to D$ be a curve such that $c(0)=p$, then the velocity of this curve is $c'(0)\in\mathbb{R}^n$.
Conversely, given $v\in \mathbb{R}^n$, let $c(t)=p+vt$ be the curve, then its velocity is $c'(0)=v$, so $v\in T_p D$. But $c$ is a straight line through $p$, so it may not even belong to $D$ at all, how is this not a contradiction?
Also, intuitively, suppose we have a sphere $S^2\subset\mathbb{R}^3$, then surely the tangent space at a point is going to be a plane, not the whole space itself?