Why is $f(x) = \frac{1}{x}$ open in $\mathbb{R}$ but not in $\mathbb{R^2}$ If we consider the sequence $\{\frac{1}{n}, n \in \mathbb{N^+}\}$ in $\mathbb{R}$ we get the set $S = \{1, \frac{1}{2}, \frac{1}{3}, \frac{1}{4}, \ldots\}$ so the sequence obviously converges to $0$. Now for any $\epsilon > 0$ there is an open ball $B_\epsilon(0) \cap S \neq \emptyset$. Thus $S$ is open in $\mathbb{R}$.
If we were to extend this case to $\mathbb{R^2}$, take the graph
$$
    \{(x,y) \mid y = \frac{1}{x}\}
$$
Then the set is closed in $\mathbb{R^2}$. I see that as $x \to \infty$, $(x,y) \to (\infty, 0)$. So there is no real limit point. Can someone explain me the intuition behind this?
 A: As a few have already mentioned, when we take the standard topology on $\mathbb{R}$ the one generated by open intervals the set $S$ is neither open nor closed.  
Why is it not open?
Take any point $p\in S$ then any neighborhood (open interval) about $p$ will not be contained in $S$ so you can say $S$ has no interior points.  Quite far from being an open set in which every point must be interior.  
Why is it not closed?
Well as you pointed out, the set has $0$ as an accumulation point because the sequence converges to $0$.  However $0\not\in S$ so $S$ cannot be equal to its closure and therefore cannot be closed.  Another way to look at it is try to write $S$ as the compliment of an open set.  
So we have a set $S$ that is neither open nor closed, again this is with respect to the topology generated by open intervals on $\mathbb{R}$.  
Now for your question about the set $$G=\{(x,y)\in \mathbb{R}^2:y=\frac{1}{x}\}$$
What does it mean for a set to be closed?
As mentioned about there are two equivalent characterizations that we can apply in this case.  
a) The set is equal to its closure.
b) The set is the compliment of an open set. 
I claim that both of these conditions are satisfied by $G$.  
For a, suppose $p$ is an accumulation point of $G$.  Then, every neighborhood of $p$ contains at least one point in $G$ distinct from $p$. Now what do neighborhoods in $\mathbb{R}^2$ look like? Well it depends on the topology you are using.  They can be open discs, rectangles or many other objects.  We will again choose the topology generated by the metric which means we will use discs as neighborhoods.  (This is equivalent to using rectangles) 
So if we have a $p$ as described above that does not belong to $G$ then $p$ must be a finite distance $d$ from the graph, so draw a disc around $p$ of radius say $\frac{d}{2}$.  Then this disc cannot intersect $G$ and since $p\not\in G$ tells us that $p$ cannot be in the closure.  Therefore we see that $G$ must be closed. 
I leave it to you to convince yourself that b is also true for $G$. 
My last point is about what you mentioned regarding infinity.
Although we can speak of the limit at infinity in $\mathbb{R}$ it is not a point on the real line so we cannot speak of accumulating a infinity so to speak.  You can if you are working in the extended real numbers 
$$\overline{\mathbb{R}}=\mathbb{R}\cup\{-\infty, \infty\}$$
However, as a topological space this is very different. 
