The action of Chern-Simons theory on a 3-manifold $M_3$ can be written as a boundary term of Yang-Mills theory on a 4-manifold $M_4$ of boundary $M_3$. If one is interested in $M_3=\mathbb{R}^3$ then a natural choice is to take $M_4$ to be a four dimensional half space $\mathbb{R}^+ \times \mathbb{R}^3$ of boundary $\{0\} \times \mathbb{R}^3$. Strictly speaking, $\mathbb{R}^4$ has no boundary (at least in the most naive sense) and so writing things like $\partial \mathbb{R}^4$ is not really correct if no additional precision is given.
To ignore boundary terms is only reasonable in some cases (when they are none or when their contributions obviously vanish). Chern-Simons theory is a natural theory living on some 3-dimensional boundary of 4-dimensional Yang-Mills theory. One can define and study Chern-Simons theory independently of this fact but to remember this often sheds light on important issues (example: quantization of the Chern-Simons level is related to the quantization of the instanton number).