If we have a commutative ring with 1, what can we say about $\operatorname{dim} S^{-1}A$ for some multiplicative subset $S$, or more specifically, what happens if $S = A \setminus \mathfrak{p}$ for a prime ideal $\mathfrak{p}$?

Do the dimensions of the localization generally coincide for distinct prime or maximal ideals? Thanks!