I understand what lens correction does, correcting vignetting, barrel/pin cushion distortion and other types of distortion, however I was wondering what the photo is corrected to? Vignetting is relatively simple, make every pixel an even exposure. For barrel/pin cushion distortion however, does a camera/lens lens correction preset try to correct to what looks good, what the human eye sees, what results in straight/straight enough lines, or something else?
Pincussion or barrel distortion is corrected to the ideal rectilinear lens of the appropriate focal length, one that obeys the pinhole projection model perfectly (all straight lines remain straight). It's an unambiguous correction (I.e. there is one right answer).
The image will be copied to a rectangle, altering the effective focal length.
The corrections deal with a set of aberrations that the lenses have due to optical imperfections in design and production. Each aberrations are described with equations, which are used to correct the images into how the images would have looked if the lens did not have these aberrations in the first place. Reading your questions it looks like you think it uses the image material to correct it. This is not the case. The software uses a knowledge database , or it has the user in the loop to trial and error the parameters in the equations. Normally, the parameters are found through calibration, taking multiple shots of a calibration target. Lightroom has a tool for doing this, if it does not already have a profile. The parameters depend on focal length, true optical center of the lens (not exactly width/2, height/2), and focus, as well is radial and tangential distortion coefficients. Usually the effect of focus is ignored, though as it is small compared to the others. The model for chromatic aberrations are not as well described as the pincussion/barrel distortion and vignetting, so the user is often in the loop for that one. So actually, the notion of using image data in the correction does happen through the calibration phase, but multiple images are used in the process.
I'd say it depends on the software you're using. Lightroom has many profiles to work with. You're pictures won't always have straight lines for correcting it to "what looks good". So Lightroom has profiles that will use the camera/lens/focal length to correct the barrel/pin cushion. This is more reliable than guessing, but it will require Lightroom to have your lens and camera profiles.