The center of mass of a plane figure/object F is, physically speaking, the center of gravity (or "balancing point") of the object. (To be completely precise, the center of gravity might differ from the center of mass if the "gravitational field is non-uniform"---but on Earth this is not something we have to worry about.)
As such, we might expect the center of mass to be a weighted average of the points in F. More precisely, if μ(p) is the density at point p∈F (note: p is in the plane, so it has some coordinates (x,y))---so the total mass of F is ∬p=(x,y)∈Fμ(p)dxdy then the centroid (in Cartesian coordinates) is
(∬p=(x,y)∈Fx⋅Mμ(x,y)dxdy,∬p=(x,y)∈Fy⋅Mμ(x,y)dxdy).
This might look scary at first, but in words, the x-coordinate of the center of mass is just the average of the x-coordinates of points in F, with "heavier" points p of larger density μ(p) getting more weight in the average; and the same for the y-coordinate.
If μ(p)=1 for all p∈F (in this case we say F has "uniform density"---the weight is equally distributed), then what does M (the weighted mass) simplify too?
When F has uniform density, M is just the integral of 1dxdy over all of F, which is just the area of F.