Local Curvature of Space
According to Einstein’s theory of general relativity, massive objects warp the spacetime around them, and the effect a warp has on objects is what we call gravity. So, locally, spacetime is curved around every object with mass.
Overall Curvature of Space
Mass also has an effect on the overall geometry of the universe. The density of matter and energy in the universe determines whether the universe is open, closed, or flat. If the density is equal to the critical density, then the universe has zero curvature; it is flat. You can imagine a flat universe like a sheet of paper that extends infinitely in all directions. A universe with density greater than the critical density has positive curvature, creating a closed universe that can be imagined like the surface of a sphere. And if the universe’s density is less than the critical density, then the universe is open and has negative curvature, like the surface of a saddle.
Measurements from the Wilkinson Microwave Anisotropy Probe (WMAP) have shown the observable universe to have a density very close to the critical density (within a 0.4% margin of error). Of course, the observable universe may be many orders of magnitude smaller than the whole universe. But the part of the universe we can observe appears to be fairly flat.