bcrowell said:
Measurements show that the curvature is very close to zero, and the error bars are still consistent with either a positive or a negative curvature. Therefore we don't yet know whether the universe is finite or infinite.
Let me elaborate a bit more on this point, since the OP wanted also to better understand the reasoning behind curvature measurements.
If we start with a more familiar 2-dimensional space (i.e., a surface) and try drawing a triangle on it, we may notice that the sum of the angles of the triangle may vary depending on how curved the surface is.
A standard, flat 2D surface (an euclidean surface), such as that we learn about in school, will always have the sum of angles in all triangles net 180 degrees.
If, however, we tried to draw the same triangle on a surface that is positively curved - such as a sphere, we'd notice that the angles add up to more than that. This is best illustrated by the surface of the Earth, and a triangle between a pole, and two points on the equator. It's easy to see how you can make a triangle with all angles equal to 90 degrees, or more.
The following picture from the wiki article on shape of the universe illustrates these two cases, together with one of negative curvature (where angles add up to less than 180 degrees (in the middle):
An important point to notice here, is that when drawing triangles on a large-scale curved surface, such as the surface of Earth, very small triangles look like they're drawn on a flat surface. I.e., it's easy to fool yourself into thinking that the Earth is flat.
Only very large triangles begin to exhibit measurable deviations from the euclidean space. This is, however, just a limitation of our measuring ability. With better, more accurate equipment, it's possible to see the deviation for smaller and smaller triangles (disregarding issues of uneven ground etc.). With less-curved surfaces (e.g. on larger planets), the triangles need to be larger or equipment more sensitive.
Measuring curvature in the 3D space of the universe follows the same logic.
What is needed is a feature on the sky, whose actual size and distance can be deduced. The edges of this feature will constitute two of the three vertices of the triangle (the third one being the observer). With size and distance available, it is relatively easy to calculate how large the feature should look on the sky if the space were flat, and compare with the observed angular size. Any deviations will point to either positive or negative curvature universe.
The feature used in such measurements are the Baryon Acoustic Oscillations - a type of overdense regions in the plasma in the early universe, whose density fluctuations left an imprint on the Cosmic Microwave Background Radiation. Their size can be calculated from the properties of the plasma, and the distance to the CMBR can be also deduced. All that is left is compare the predicted sizes of the blobs with those observed imprinted in the CMBR.
These have the advantage of being probably the largest such triangles we can draw.
So far it appears that they are consistent with the predictions of a flat model of the universe. An important point to observe here is that if the universe is actually flat, we will never be able to tell with a 100% certainty that it is so, since it is impossible to make a perfect measurement that'd exclude all but a single value of curvature - and flatness is such a goldilocks value. All we can do is narrow the error bars on the measurements.
If the universe is not flat, then we may be able to tell, if we narrow the error bars enough to exclude the one case of exactly zero curvature.
So while we might not know or ever find out if the universe is really flat, none of the ongoing successive measurements of ever increasing precision have been able to exclude the 0 curvature scenario, so it is fair to say that the universe looks
remarkably flat - and by extension either infinite or so large that we can't tell the difference.