From the book Elementary Differential Geometry by Andrew Pressley, this is the definition of a surface:
A subset $S$ of $\mathbb{R^3}$ is a surface if, for every point $p \in S$, there is an open set $U$ in $\mathbb{R^2}$ and an open set $W$ in $\mathbb{R^3}$ containing ${P}$ such that $S \cap W$ is homeomorphic to $U$.
I am struggling to understand this definition.
Why do we consider an open set $U$ in $\mathbb{R^2}$
Why do we consider the intersection of $S$ and $W$?
What is the motivation behind this definition?
What's the motivation? A surface should "look locally" like $\mathbb{R}^2$: if you zoom way in, it's "flat." That means every point should have a neighborhood that's homeomorphic to $\mathbb{R}^2$.
So why $U$? In fact we could eliminate this and just demand that $S \cap W$ be homeomorphic to $\mathbb{R}^2$. Since $\mathbb{R}^2$ has the useful property that every point has arbitrarily small neighborhoods which are themselves homeomorphic to $\mathbb{R}^2$, the two definitions are equivalent. Often the definition where we consider $U$ arbitrary in $\mathbb{R}^2$ is easier to check, but it's just a matter of taste.
Why the intersection? Well, that's just the definition of the topology on $S$. A subset of $S$ is "open in $S$" if and only if it is the intersection of an open subset of $\mathbb{R}^3$ with $S$. Note that such a set is never open in $\mathbb{R}^3$ itself.
So, in summary, the definition is just saying every point in $S$ has an open neighborhood (open in the sense of the topology of $S$) that looks like $\mathbb{R}^2$ (or the seemingly-more-general-but-in-fact-equivalent requirement "looks like $U$ for some $U$ open in $\mathbb{R}^2$).