Function on a manifold A question has been bothering me. 
If I have a smooth (for simplicity) 2 dimensional manifold $M$, how could I possibly specify a function on the manifold $f:U\subseteq M\to f(U)\subseteq \mathbb{R}$ in an unambiguous manner? 
If I take into account than any open $U\subseteq M$ is homeomorphic to $\mathbb{R}^2$, still it is unclear to me how to identify any $p\in M$ with a tuple $(a,b)\in \mathbb{R}^2$.  It seems I need a chart to achieve this identification of $p\in M$ with $(a,b)$ but which chart should one use?
Isn't there a huge degree of ambiguity, with regards to the definition of $f$? It seems to me it depends on the chart I use to represent $p\in M$.
 A: As it has been pointed out in the comments already, a smooth manifold is a set of points with a bunch of additional structure. As such, we can define a function $f$ (not smooth, or even continuous yet) as way of associating to each point $p\in M$ a real number $f(p)$. This is just a map of sets and makes no reference to charts. 
However, we should really take advantage of the extra structure our smooth manifold has (other than just being a set) and define more "refined" functions (maybe continuous or smooth). To do this, we need charts. We will proceed as follows: first you and I will both pick our favorite charts around a point $p\in M$. Call your chart $\varphi_1: U \to V_1 \subset\mathbb{R}^2$ and my chart $\varphi_2: U \to V_2\subset \mathbb{R}^2$ where $U$ is a neighborhood of $p$. Now, you can go ahead and define a function $f: M \to \mathbb{R}$ (as just a map of sets for now). To check that it is smooth, or take derivatives, or do any sort of analysis at the point $p$, you will use your chart. In particular, $f$ is smooth at $p$ if the composition
$$f\circ \varphi_1^{-1}: V_1 \to \mathbb{R}$$
is smooth at $\varphi_1(p)$. Now, if I want to check if $f$ is smooth at $p$, I will do the same using my chart. That is, I will check if the composition 
$$f\circ \varphi_2^{-1}: V_2 \to \mathbb{R}$$
is smooth at $\varphi_2(p)$. The important thing is that we should both get the same answer to any analytic question about the function $f$. In this example, we should agree on whether $f$ is smooth at $p$ or not. This happens if the composition
$$\varphi_2\circ \varphi_1^{-1} : V_1\to V_2$$
and its inverse are both smooth maps. This is exactly the kind of thing that the "maximal atlas" definition of smooth manifolds guarantees will happen. For any choice of charts, the compositions like the one written above are required to be smooth maps. 
Punchline: The definition of a smooth manifold requires picking a class of all allowed charts and ensures that these charts are all compatible (in the sense explained above). We may choose to define things on our manifold (like whether a function is smooth) in a particular allowed coordinate chart as long as this definition can be translated consistently between two allowed coordinate charts. This type of approach is familiar from discussing tensor fields on smooth manifolds. We are content with defining these "in coordinates" as long as the definitions transform correctly under a change of coordinate charts.  
A: This is a slightly philosophical question, but I think I know what you're getting at. When we define a manifold (or anything, really) as a set, we're supposing the elements of the set have some kind of "identity" which sets (heh) them apart. If the set is countable, you can imagine that you paint little numbers on top of its points, as a means of identifying them (if it's uncountable you can't do that, but it's just a picture, not how it really works).
To emphasize, when we define a manifold as a set with some structure, we're supposing that the set is already there, and that we have some means of identifying the points. Given that, it's easy to define a function: you just say what value it takes on each of the points, which, again, are not all identical.
You're sort of correct that there is ambiguity in this; not actual mathematical ambiguity (everything is well defined, don't worry about that), but ambiguity when thinking of the world (space or spacetime or whatever you want) as a manifold. Think of flat space for simplicity. We said that each of its points has an identity, but if you take the whole space and rotate it or translate, the identity of the points changes but the space is essentially the same. That's why we say that spacetime is some manifold up to isometry (or homeomorphism, or diffeomorphism, or...): the isometries are the functions that move points around but leave us with essentially the same space.
How do we identify points physically? Simple. Suppose our manifold $M$ is spacetime. Then its points are events, and we can identify them by the physical place and time they occupy in the universe. For example, I can say that some event $p\in M$ corresponds to me starting to type this answer right here where I'm sitting. Physically this a a more or less well defined event; the time and place are not defined with perfect precision but this is just an example. I could go on like this, filling my manifold with events. Notice that I haven't mentioned coordinates anywhere: that's because I haven't needed them! The coordinates are a numerical representation of the points, not their identity.
