Suppose that $C$ is a closed subset of $M$. Denote by $\newcommand{\eO}{\mathscr{O}}$ $\eO$ its complement.

The DeRham cohomology of $M$ is in fact the cohomology associated to a particular soft resolution of the constant sheaf $\newcommand{\ur}{\underline{\mathbb{R}}}$ $\ur$ on $M$.

To any sheaf $\newcommand{\eS}{\mathscr{S}}$ $\eS$ on $M$ we can associate a sheaf $\eS_{\eO}$, also on $M$ whose stalk $\eS_{\eO}(x)$ at $x\in M$ is $\eS(x)$ if $x\in \eO$, and $0$ if $x\in M\setminus \eO$. For any open subset $U\subset M$ the space $\Gamma(U, \eS_{\eO})$ of sections of $\eS_{\eO}$ over $U$ consists of the section $s\in \Gamma(\eO\cap U,\eS)$ such that the support of $s$ is **closed in $U$**. The operation $\eS\mapsto \eS_{\eO}$ is an *exact functor*. Moreover if $\eS$ is soft, so is $\eS_{\eO}$. Thus the DeRham resolution

$$ 0\to\ur\to\Omega^0\to\Omega^1\to\cdots, $$

$\Omega^k=$ the sheaf of smooth $k$-forms on $M$, produces a soft resolution of $\ur_{\eO}$

$$ 0\to\ur_{\eO}\to\Omega_{\eO}^0\to\Omega_{\eO}^1\to\cdots . $$

Hence, the cohomology of the sheaf $\ur_{\eO}$ is computed by the the cohomology of the complex

$$ \Gamma(M, \Omega_{\eO}^0)\stackrel{d}{\to}\Gamma(M, \Omega^1_{\eO})\stackrel{d}{\to}\cdots, \tag{1} $$

where, as explained above $\Gamma(M, \Omega^k_{\eO})$ consists of smooth $k$-forms on $\eO$ whose support is a closed subset in $M$. Equivalently $\Gamma(M, \Omega^k_{\eO})$ consists of forms on $M$ whose supports do not intersect $C$. If $M$ is compact, then $\Gamma(M, \Omega^k_{\eO})$ consists of form with compact support contained in $\eO$.

On the other hand, the cohomology of $\ur_{\eO}$ can be identified with the relative cohomology $H^\bullet(M,C;\mathbb{R})$. The complex (1) is the a DeRham model for this cohomology. For more details I recommend the comprehensive book of Kashiwara and Schapira *Sheaves on Manifolds* or my notes which are less comprehensive, but may guide you through the literature. In particular, see Remark 2.17 of my notes.