Holy moly. Somebody completely blotted out the NP-Completeness section of the Wikipedia page. (And the edit page is so full of cruft I can’t find a suitable older version.) They even took out useful links. Sheesh. Wiki-jerks.
The idea is to start with a bunch of variables like X[i,j,k] that would be true if the square at (i,j) contains the number k. You build up a Boolean formula of a lot of clauses such as X[0,0,9] OR NOT X[0,1,9]. That is, if the cell at (0,0) contains a 9 then the cell at (0,1) cannot contain a 9. There are a lot of such clauses requiring that each cell contains a number, and no dups in blocks, rows and columns.
You then substitute your “knowns”. If there is a 4 at (3,7), you replace X[3,7,4] with 1 (or TRUE), etc.
You now have a big Boolean formula in CNF. You use the usual Boolean algebra rules to multiply thru to get a formula in DNF. You have a single term whole remaining variables tell you what the solution is. E.g., if it contains X[2,5,3] then there is a 3 at (2,5). (It will also contain negative literals, but those just reinforce the solution.)
Note that if the puzzle is badly constructed, then you can end up with a 0 (FALSE) term which means the puzzle has no solution or 2+ terms which means the puzzle has multiple solutions.
I again want to repeat that no guessing is ever required. For humans, as has been mentioned, it’s just a question of how far you can look ahead. Some are better than others. It would be idiotic to say that looking 2 levels ahead is not guessing but 3 levels ahead is guessing.
So, everybody who asked more about my post about various situations. Same answer. No guessing is ever required. Never. Period.