In this paper, we study ideals defined with respect to arbitrary multiplicatively closed subsets \(S\subseteq R\) of a commutative ring R. An ideal \(I\subseteq R\) is called an S-ideal if for all \(a,b\in R\) , the condition \(ab\in I\) and \(a\in S\) implies \(b\in I\) . This is equivalent to the identity \(I=S^{-1}I\cap R\) , where \(S^{-1}I\) is the extension of I in the ring of fractions \(S^{-1}R\) . The concept of S-ideals provides a unified framework encompassing several classical ideal types. For instance, r-ideals arise when \(S=\operatorname {reg}(R)\) , the set of regular elements. If \(S=R\setminus P\) for a prime ideal P, then the S-ideals containing P coincide with P-primary ideals. Ideals that admit primary decomposition correspond to S-ideals for which S is the complement of a finite union of prime ideals. Moreover, \(z_{0}\) -ideals are S-ideals when S is the complement of a union of minimal prime ideals of R. We generalize several results known for r-ideals to this broader setting and investigate structural and closure properties of S-ideals in various contexts. As an application, we give a characterization of the von Neumann regularity of the localization \(S^{-1}R\) in terms of S-ideals. We also study the behavior of S-ideals in polynomial rings, idealizations, and amalgamated constructions with respect to different choices of S.