You need to know four sets of information in order to precisely locate a pixel from the image to the ground.
1) The position of the camera (three coordinates : X,Y,Z)
2) The angle of view of the camera (three angles: omega, phi, kappa)
3) The distance between the camera and the soil (or the scale of the picture)
4) the geometry of the camera (e.g. the focal distance)
The first two sets of parameters can be obtained from instrument onboard for a first approximation. For instance, a DGPS receiver provides precise X,Y,Z position, and for the angles there are inertial systems (INS). On satellites, there are also star trackers: the best satellites have a location accuracy of less than 5 meters only based on their instruments and the distance to the soil. For a more precise location, the parameters can be estimated based on a model and a set of points with known coordinates on the ground that can be precisely located on the image (called Ground Control Points). When you know the orientation of the sensor, you can build a line segment that goes from the focal point of the sensor and through the pixel location on the image toward the ground.
The ground-sensor distance can be computed if you have a digital surface model (DSM, which is like a Digital Elevation Model + height of the objects). Then you compute the intersection between the ray from the sensor (you know the origin and the angles) and the surface on the ground. If you don't have an accurate and uptodate DSM, you can use a second image to solve the problem (like our brain does to see in 3D thanks to our 2 eyes).
When you have the above mentioned infomations, you can compute the position of each pixel. For the sake of comleteness, you should also take into account some sources of errors including lens(or mirror) distortions (solved by calibration of the lens), Earth curvature and curved path through the atmosphere (there are also models for that), etc.