Geometry is in some sense where modern mathematics all starts, with Euclid's axioms, the search for a proof of the fifth postulate, and the emergence of non-Euclidean geometry.
For a long time, Euclid's axioms and his geometry was regarded as the definitive example of good mathematics, and indeed what mathematics was about. This applies particularly during the renaissance period where most thinking was influenced and based on classical sources. (Indeed the idea that mathematics is about the concept of number is a much more modern one. For some more information on this see "Infinitesimal: How a Dangerous Mathematical Theory Shaped the Modern World" by Amir Alexander. This book has some useful insights, though is a bit uneven in many respects.)
Euclid wanted his geometry to be rigorous. And that meant ensuring that everything was proved and watertight. Unfortunately for Euclid, he realised there would always be things that couldn't be proved. The very first thing can't be proved, because there is nothing for it to have come from. We have seen the same thing with axioms (or rules) for numbers saying what it is that numbers do. Euclid's geometry was the main precursor for the axiomatic method applied to mathematics.
So, knowing that he could not prove anything at all without some basic assumptions, Euclid stated his geometry in terms of axioms. We can see his axioms as describing the rules of lines and points in the plane - what they do, rather than what they are.
In particular, we can imagine mathematical situations that are exactly described by Euclid's axioms. The most obvious one is the two dimensional plane, with its points and straight lines. In this sense Euclid's axioms describe the rules and the two dimensional plane, is an exact mathematical model.
Euclid's axioms and this mathematical model can also be used to approximate the study of real-world figures on a sheet of paper, and many other things besides. It is easy to generalise this model and the axioms to three dimensions to "Euclidean three dimensional space" and this space is the foundation of Newtonian physics, for example. We call this space "flat" by analogy with the flat plane described by the two dimensional model.
Thus, we can see Euclidean geometry as a mathematical model for the real world, and this this the currently accepted position. Thus Euclidean geometry is a mathematical theory of the physical world, and not necessarily exact, but we hope that it is useful in many ways. Whether Euclid himself saw geometry as "just a mathematical model" or something with a more absolute "truth" about it is not 100% clear. In other words, is the universe about us an exact version of mathematical Euclidean space, or just an approximation to it?
A major problem arose in geometry that was worked on throughout the medieval and Renaissance period, which was to prove the complicated Fifth Postulate of Euclid from the others. A number of "proofs" of the Fifth Postulate were published, all with very subtle errors. It seems that mathematicians and geometers were so convinced in Euclid's axioms that their imagination did not easily stretch to cases in which these axioms might be false, and as a consequence they "accidentally" assumed them in their proofs. Thus most "proofs" of the Fifth Postulate implicitly use the Fifth Postulate in one or more steps in the argument. It might be interesting to speculate whether Euclid possibly believed that the Fifth Postulate does not follow from the others. After all he chose to include it in his list of axioms. But many others following on from him thought it could be omitted.
It is also certainly true that a number of more modern thinkers did regard Euclidean geometry as a self-evident truth about the real world, and a number of philosophers got in a real muddle with this. Kant (1724-1804), for example, was so sure that Euclidean geometry wasn't just a model of three dimensional space but actually was three dimensional space that he placed "mathematics" on a completely different level to all other kinds of thought in his "Critique of pure reason".
Very soon after this, a number of mathematicians (including Bolyai and Lobachevsky in the early 19th century) showed that there are many different models for geometry and Euclidean geometry is only one of these possibilities. Much of this effort was in answer to an age-old question whether the complicated fifth axiom (or parallel postulate) of Euclid could be proved from the other four. Bolyai and Lobachevsky showed through giving non-Euclidean mathematical models of geometry that it cannot.
Einstein's contribution to Geometry in his general relativity is often cited in this respect. What Einstein did was to develop the theory of gravity based on an idea of curvature in three dimensional space. In other words Einstein gave a different mathematical model for the geometry we find in the universe. Einstein's model of space is remarkably successful (though so is Newton's in a lot of simple cases where the additional complexity of the calculations is not needed), and "curved" models explain gravity better. Of course if space is curved not flat a further dimension must be involved. For Einstein that dimension that curves our space is time.
The most straightforward examples of geometry failing to satisfy the Euclid axioms are when "space is curved". Space can be curved positively like on the surface of a sphere, or negatively like on the surface of a mountain pass or horse's saddle.
I strongly recommend you read Gowers for details on the Euclidean axioms. The cases of geometry on the surface of a sphere is probably simplest. Here, the surface is not flat. One could detect this by placing a large number of objects equally spaced on the surface and then counting the number of objects within circles of a certain radius from a given point. (Here the plane is said to be curved positively because the number of objects found would be smaller than the Euclidean prediction.) Spherical geometry is not Euclidean, but doesn't actually satisfy Euclid's first four axioms. For more complicated examples where these first four axioms hold true we need to look at hyperbolic geometry (which curved negatively).
A number of problems were left over from Greek geometry (such as "squaring the circle", "doubling the cube" or "trisecting the angle") and these seemed to focus the mathematical mind up to the 19th century, almost up to being an obsession. The three problems just mentioned turn out to be impossible, essentially via work by Galois on polynomial equations.
It turns out that these problems and the key to their solution are essentially arithmetic. Ruler-and-compass constructions in geometry correspond to certain kinds of constructions of algebraic numbers, extracting square roots for example. By making the connections precise and by studying the properties of numbers like and the cube root of it is possible to show that these numbers cannot be constructed using ruler-and-compass constructions. Because mathematics was, to the ancient Greeks' and those Renaissance and other followers of Euclid, essentially geometric rather than arithmetic, and "normal arithmetic on numbers" was not really mathematics but something else, this work could not be done until the development of different kinds of number (rational, algebraic, transcendental...) had caught up with the knowledge of geometry. This didn't happen until the 19th century.
A great deal of progress is made in mathematics by similar means: by observing that looking at a problem in a new way one can get insights or connections with a seemingly completely unrelated area. (Who would have thought that ruler-and-compass constructions have anything to do with solving polynomial equations?)
It is also possible to have finite geometries. The card game Set! see https://en.wikipedia.org/wiki/Set_(game) has 81 cards, each with four attributes, each attribute having three values. A set is a set of three cards in which, for each attribute, the three cards are all equal in the attribute, or all different. Thus two cards uniquely determine a third card making up a set with it.
Thinking about the cards as the "points", the "lines" are the sets. The feature of the game that any two cards uniquely determine a third card making up a set is the same as saying that any two points have a unique line through them. What other axioms hold?
title: Explain a non-euclidean model of geometry.
Conclusions: what really is "geometry" and how is it abstracted?