In this paper, we introduce a method by which we can find a close connection between the set of prime $z$-ideals of $C(X)$ and the same of $C(Y)$, for some special subset $Y$ of $X$. For instance, if $Y=Coz(f)$ for some $fin C(X)$, then there exists a one-to-one correspondence between the set of prime $z$-ideals of $C(Y)$ and the set of prime $z$-ideals of $C(X)$ not containing $f$. Moreover, considering these relations, we obtain some new characterizations of classical concepts in the context of $C(X)$. For example, $X$ is an $F$-space if and only if the extension $Phi : beta Yrightarrowbeta X$ of the identity map $imath: Yrightarrow X$ is one-to-one, for each $z$-embedded subspace $Y$ of $X$. Supposing $p$ is a non-isolated $G_delta$-point in $X$ and $Y=Xsetminus{p}$, we prove that $M^p(X)$ contains no non-trivial maximal $z$-ideal if and only if $pinbe X$ is a quasi $P$-point if and only if each point of $beta Y setminus Y$ is a $P$-point with respect to $Y$.