Let me give you a geometric motivation. I am on purpose a bit vague here. For a given point $x \in X$, you can look at the functions $f$ defined "in a little neighborhood of $x$, where $f,g$ will be equivalent if there is a little neighborhood $U$ of $x$ where $f_{|U} = g_{|U}$. More formally we are looking at the stalk at $x$ of the sheaf of function on $X$.
For example, let's take the origin in $\mathbb A^1$. the function $\frac{1}{x +1}$ is not defined at $-1$, but it is certainly at $0$ and should be in this ring of "local functions". Our strategy will be to write our function $\frac{f}{g}$ and verify that $g$ is non-zero at $0$. But such functions are exactly the $x^r \frac{f}{g}$ where $f(0) \neq 0, g(0) \neq 0$ and $r \geq 0$.
The localization $K[[x,y]]_{(y)}$ has exactly the same interpretaion : we are localizing at the $x$-axis (defined by the equation $y = 0$), so we are looking in all the functions which are defined in a neighborhood of the $x$-axis, and as before this is the functions which can be written as $y^r \frac{f(x,y)}{g(x,y)}$ where $y$ does not divide $f$ and $g$, and $r \geq 0$.