Work in a normal (resp. regular) borel measure space $(X,S;\mu)$, where $X$ is a normal topological space (resp. a locally compact hausdorff space).
Fix $p\in[1,\infty]$. Let $f\in L^{p}(\mu)$. First note that we can approximate $f$ by simple functions, where, by approximate, I mean topologically with respect to the norm $\|\cdot\|_{p}$ (even for the case that $p=\infty$). Next we can approximate simple functions (i.e. measurable functions with countable image), by simple functions with finite image (even for the case that $p=\infty$). Since simple functions are simply a sum of weighted characteristic functions, it suffices to approximate characteristic functions by continuous functions, for then the weighted sum of these continuous functions will be an approximation of the finite simple function.
So consider $A\subseteq X$ measurable so that $\chi_{A}\in L^{p}(\mu)$. Now assume $p<\infty$. Let $\varepsilon\in\mathbb{R}^{+}$. Let $C$ be closed (resp. compact) and $U\supseteq C$ open (resp. $\sigma$-bounded open), so that $C\setminus A, A\setminus U$ are null, and $\mu(U\setminus C)\leq\varepsilon^{p}$. Let $f:X\to[0,1]$ be continuous and separate $C$ from $X\setminus U$ (the topological conditions on $X$ ensure this is possible). Clearly $f\in L^{p}(\mu)$, since $\int |f|^{p}~\operatorname{d}\mu\leq\mu(U)\leq\mu(U\setminus C)+\mu(A)\leq\varepsilon+\|\chi_{A}\|_{p}^{p}<\infty$.
Also $\int |f-\chi_{A}|^{p}~\operatorname{d}\mu\leq\varepsilon^{p}$, so $\|f-\chi_{A}\|_{p}\leq\varepsilon$.
This demonstrates that we can always approximate measurable functions from $L^{p}(\mu)$ by continuous functions in $L^{p}(\mu)$ for $1\leq p <\infty$.
(For $p=\infty$, this fails as follows. Consider e.g. $X=[0,1]$ and $\mu=\mathcal{L}|[0,1]$ the lebesgue measure. Let $A=[0,1/2]$ say. Suppose $f_{n}:X\to[0,1]$ were continuous and $f_{n}\rightarrow \chi_{A}$ in $L^{\infty}(\mu)$. Then $(f_{n})_{n}$ would be cauchy in the polish space $C(X,[0,1])$, and thus would converge within that space. But then the limit of the $f_{n}$ would be both continuous and not continuous. A contradiction.)