Let $R$ be a commutative ring with $1$. (If required, assume also that $R$ is an integral domain.) Consider the localization $R_f$ at $0\neq f \in R$ where the multiplicative set is $S=\{f^n\}_{n \geq 0}$.
Is there any relation between this ring $R_f$ and the polynomial ring $R\big[\frac{1}{f}\big]$? Relation as in (say) some sort of correspondence between the prime ideals of the two rings.
My primary motivation to ask this question comes from trying to understand all the prime ideals of $\mathbb{Z}\big[\frac{1}{n}\big]$. I found this link with the same question as mine. But I don't see why it is marked as a "duplicate" to another question.
Can someone perhaps clarify the relation between $R_f$ and $R\big[\frac{1}{f}\big]$?