We know very little of Ptolemy's life. His name, Claudius Ptolemy, is of course a mixture of the Greek Egyptian "Ptolemy" and the Roman "Claudius". This would indicate that he was descended from a Greek family living in Egypt and that he was a citizen of Rome.
Ptolemy definitely made astronomical observations from Alexandria in Egypt during the years from 127 to 141. We suspect his teacher was Theon of Smyrna, who was both an observer and a mathematician who had written on astronomical topics such as conjunctions, eclipses, occultations and transits.
The earliest, and perhaps most important of Ptolemy's work that has survived is the Almagest, a treatise in 13 books. It gives in detail the mathematical theory of the motions of the Sun, Moon, and planets. Ptolemy made his most original contribution by presenting details for the motions of each of the planets. His theories were not superseded until a century after Copernicus presented his heliocentric theory in 1543.
Ptolemy first of all justifies his description of the universe based on the earth-centred system described by Aristotle. It is a view of the world based on a fixed earth around which the sphere of the fixed stars rotates every day, this carrying with it the spheres of the sun, moon, and planets. Ptolemy used geometric models to predict the positions of the sun, moon, and planets, using combinations of circular motion known as epicycles. Having set up this model, Ptolemy then goes on to describe the mathematics which he needs in the rest of the work. In particular he introduces trigonometrical methods based on the chord function.
Ptolemy devised new geometrical proofs and theorems. He obtained, using chords of a circle and an inscribed 360-gon, the approximation pi = 3 + 17/120 = 3.14166. He used formulas for the chord function which are analogous to our formulas for sin(a+b), sin(a-b) and sin(a/2) to create a table of the chord function at intervals of 1/2 a degree. This occupies the first 2 of the 13 books.
Based on his observations of solstices and equinoxes, Ptolemy then found the lengths of the seasons and, based on these, he proposed a simple model for the sun which was a circular motion of uniform angular velocity, but the earth was not at the centre of the circle but at a distance called the eccentricity from this centre. This theory of the sun forms the subject of Book 3.
In Books 4 through 6, Ptolemy gives his theory of the moon. In Book 4 Ptolemy gives Hipparchus's epicycle model for the motion of the moon, but he notes that there are small discrepancies between the model and the observed parameters. In Book 5 he gives a model which improves markedly on the one proposed by Hipparchus. In book 6 he puts forth a theory of eclipses.
The next 2 books deal with the fixed stars, justifying his belief that the fixed stars always maintain the same positions relative to each other. He also discusses precession, and gives a star catalogue containing over 1000 stars.
The final 5 books of the Almagest discuss planetary theory. This must be Ptolemy's greatest achievement in terms of an original contribution, since there does not appear to have been any satisfactory theoretical model to explain the rather complicated motions of the five planets before the Almagest. Ptolemy combined the epicycle and eccentric methods to give his model for the motions of the planets. This theory is a masterpiece. He created a sophisticated mathematical model to fit observational data, which before Ptolemy's time was scarce, and the model he produced, although complicated, represents the motions of the planets fairly well.
Ptolemy also a popular account of his results. This work, in 2 books, reduces the mathematical skills needed by a reader. Ptolemy does this rather cleverly by replacing the abstract geometrical theories by mechanical ones. Ptolemy also wrote a work on astrology. In another book, he discussed methods of finding the angles need to construct a sundial which involves the projection of points on the celestial sphere. In yet another work, he is concerned with stereographic projection of the celestial sphere onto a plane.
Ptolemy published a major work Geography, written in eight books, which attempts to map the known world giving coordinates of the major places in terms of latitude and longitude. It is not surprising that the maps given by Ptolemy were quite inaccurate in many places for he could not be expected to do more than use the available poor data. Another work on optics is in 5 books. In it Ptolemy studies colour, reflection, refraction, and mirrors of various shapes.
Because of systematic errors in his works, Ptolemy is accused by some of just correcting Hipparchus' data for precession. Indeed there is some evidence that Ptolemy is guilty of stealing and fabricating data. But he is still one of the most influential Greek astronomers and geographers of his time.