tilde operator is often used to denote a statistical model, where the thing on the left of the ~ is the response and the things on the right of the ~ are the explanatory variables.
here is an example fo <- y ~ x1*x2
this line of code from this post
coordinates(meuse) = ~x+y
let's leave coordinates alone temporally.
in the case of
x = 1
y = 2
(or another more reasonable concrete example)
what is the detailed procedure of ~x+y operation?