transformations of explanatory variable

If you look at the residuals for some response variable y regressed on some explanatory variable x and you see some pattern, e.g. the residuals seem to be fanning out (heteroskedasticity) then you can transform the response varible y with, say, an inverse transform.

Today I heard that not only could you transform the response variable but you can also transform the explanatory variable x. Why would you do this and how is it different from transforming the response variable y? Does it make a difference?