Topology of functional spaces Let $X$ be a finite CW-complex of dimension $n$. Fix an natural number  $k < n$, and let $M(X, \mathbb{S}^k)$ be the space of all continuous function from $X$ to the k-sphere $\mathbb{S}^k$ endowed with compact-open topology. What is known about the topology of such spaces? Is homology( or Homotopy) groups of such a space known? Or, in particular, if $X$ is the real projective space ${RP}^n$, what is known about the topology of this space?
 A: Here is a nice survey article by Sam Smith (also available as https://arxiv.org/abs/1009.0804): 
Smith, Samuel Bruce, The homotopy theory of function spaces: A survey, Félix, Yves (ed.) et al., Homotopy theory of function spaces and related topics. Proceedings of the Oberwolfach workshop, Mathematisches Forschungsinstitut Oberwolfach, Germany, April 5—11, 2009. Providence, RI: American Mathematical Society (AMS) (ISBN 978-0-8218-4929-3/pbk). Contemporary Mathematics 519, 3-39 (2010). ZBL1208.55006.
The collection in which it appears might contain some other papers which interest you. A lot can be said about the rational homotopy groups of $M(X,Y)$, especially when $X$ and $Y$ are simply connected. 
For $X=\mathbb{R}P^n$, an inductive approach might get you somewhere. There is a fibration $M(\mathbb{R}P^n,S^k)\to M(\mathbb{R}P^{n-1},S^k)$, induced by the cofibration $\mathbb{R}P^{n-1}\hookrightarrow\mathbb{R}P^n$. The fibre might be a bit awkward, but should be closely related to $M(S^n,S^k)$. 
Edit: I was playing a bit fast and loose with the word "The" in the last sentence above. Of course $M(\mathbb{R}P^n,S^k)$ may not be connected (its set of path components is the $k$-th cohomotopy group of $\mathbb{R}P^n$, as Thomas Rot mentioned). The fibres may be different over each component. At least over $M_0(\mathbb{R}P^n,S^k)$, the component of the trivial map, the fibre is $M_\ast(S^n,S^k)$, the space of based maps, whose homotopy groups are the homotopy groups of $S^k$.   
