I came across your question while trying to find the answer myself, and was disappointed to see it hadn't been answered. After further digging, I don't think this question has a simple answer. There's no single white paper you can read for example that will describe the algorithm in its entirety (from what I can tell).
If you happen to be really good with C++ and linear algebra, I would recommend taking a look at the Libmv source code. This is the library where the camera-solving logic for Blender lives. Perhaps unfortunately, Blender seems to be the primary consumer of this library (though OpenCV also uses it), and it seems like work on it stopped after it got to a "good enough" state (The last commit as of July 2021 was in May 2017). Probably the closest thing to a non-code description of the algorithm you're going to find is in the comment for the "EuclideanReconstructionFromVideo" function declaration in "libmv/reconstruction/reconstruction.h":
// Computes the trajectory of a camera using matches as input.
// - First keyframes are detected according a minimum number of shared tracks
// - Next the first two keyframes are used to estimate an initial structure
// - Then every other keyframe are reconstructed based on an euclidean resection
// algorithm with the previously recontructed structures and new structures
// are estimated (points triangulation). A bundle adjustment is performed on
// all the reconstruction each time a keyframe is localized.
// TODO(julien) a local bundle adjustment would be sufficient?
// TODO(julien) +a global bundle adjusment on all data at the end?
// - In a final step, non-keyframes are localized using the resection method.
// A bundle adjusment is periodically performed on all the data.
// In the case that the tracking is lost, a new reconstruction is created.
// TODO(julien) Add the calibration matrix K as input?
// TODO(julien) remove outliers from matches or output inliers matches.
To find out exactly what terms like "resection" and "bundle adjustment" mean in this context, as well as whether those TODOs were ever done, you would have to dive deeper into the code than I am willing to go at this time.