We have characterized the spaces $X$ for which the smallest $z$-ideal containing $\cinfty$ is prime. It turns out that $\cinfty$ is a $z$-ideal in $C(X)$ if and only if every zero-set contained in an open locally compact $\sigma$-compact set is compact. Some interesting ideals related to $\cinfty$ are introduced and corresponding to the relations between these ideals and $\cinfty$, topological spaces $X$ are characterized. Some compactness concepts are explicitly stated in terms of ideals related to $\cinfty$. Finally we have shown that a $\sigma$-compact space $X$ is Baire \ifif every ideal containing $\cinfty$ is essential.