In Andrew Kobin's script on Algebraic Geometry I found on page 355 a comment I would like better understand. It states
Another way to view formal smoothness is as an abstraction of Hensel's Lemma.
Formal smoothness of a scheme $X \to S$ is characterized by the property that for every $S$-scheme $Y$ and every infinitesimal subscheme $Y_0 \subset Y$ (that is defined by a nilpotent ideal sheaf in $Y$) , the canonical morphism
$$Hom_S(Y,X) \to Hom_S(Y_0, X)$$
is surjective. Well, why can this property be regarded as abstraction of Hensels lemma? The Hensel's lemma I am familar with on lifting polynomials under certain conditions from $(R/m)[X]$ to $R[X]$, where $A$ is local complete with maximal ideal $m$, that doesn't involve any assumptions that $m$ is nilpotent. In which sense can the above be regarded as an abstraction?
Another question on general properties of Henselian rings. I heard fleetingly (but forgot the concrete context) that schemes over henselian local rings have generally a rich divisor theory that on one hand somehow allows in certain way to "reduce" the analysis of divisors on $R$-scheme $X$ ($R$ local hensel with maximal ideal $m$ and residue field $\kappa=R/m$) to that on the special fiber $X \times_R \kappa$ in the sense that a "lot of information" of the theory of divisors on $X$ maybe already be extracted from the study of divisors on $X \times_R \kappa$ using formal techniques, by lifting results from $X \times_R R/m^i$ to $X \times_R R/m^{i+1}$ in much more "fruitful way" than if we work without Henselian context. On the other hand if that's true, then what I heard for example in the case of $X$'s surface there is much more "flexibility" in the constructions of divisors with desired intersection behaviour.
At least it seems that henselian assumption "guarantees" that much more information is conserved by passing to the special fiber as without this assumption. Could somebody give short insight into this correspondence principle and motivate how exactly henselianess enters fruitfully into the game? Or give a recomendable reference where these ideas are made precise and explaned in details?
Sorry if the formulation is too vague, I've only heard it once about this ideas, but unfortunately couldn't find anything about it and still quite curious what I can take from it.