I was drawing some curves on a piece of paper and then I realized that if someone else was drawing that curves and asked me to tell whether he drew them so that they intersected themselves at a point while being drawn or they touched themselves at a point while being drawn, then I could not say without a help from Sherlock Holmes what is the correct answer because both can be.
How both can be?
Well, it depends on the way in which the person draws them because there is a path of drawing some curve in which it will be drawn so that it itersected itself during the process of drawing and a path of drawing the same curve in which it will be drawn so that it touched itself during the process of drawing.
How to distinguish analytically these two notions?
Let's have a look at these two $\LARGE{8}$ curves, these are respectively:
$\#1:\begin{cases} x=\sin(2t)-2\sin(t)\\ y=\sin(2t)+2\sin(t) & t\in[0,2\pi]\end{cases}\qquad \#2:\begin{cases}r=\arccos(\frac{1-\sin(2\theta)}2) & \theta\in[0,2\pi]\end{cases}$
I graphed them with color changing as the parameter evolves, so you can notice that first curve is smooth all along and crosses itself, while the second curve has 2 cusps (at origin) and the curve touches itself.
So touching or crossing itself depends a lot of the parametrization you have chosen.
So you could say, ok, let's impose a parametrization that makes the curve smooth everywhere, then it can't have these brutal change of tangents, thus it must cross itself! But what about a curve touching itself smoothly like in the example below:
$\#3:\begin{cases} x=\sin(t)(1-\sin(2t))\\ y=\sin(t)(1+\sin(2t)) & t\in[0,2\pi]\end{cases}$
Does it touches itself or does it crosses itself ? Without the parametrization, looking only at the curve you cannot know, because either way, touching or crossing are both smooth.
Now let's talk a little about touching itself, this can be a tough definition.
Let's look for instance at this last curve.
$\#4:\begin{cases} x=\cos(t)\\y=\sin(t) & t\in[0,2\pi]\end{cases}$
Easy you will, say, it's a plain circle, curve is closed and continuous.
Now I'll choose another parametrization. Notice the hole...
$\#5:\begin{cases} x=\cos(\pi\tanh(t)-1)\\y=\sin(\pi\tanh(t)-1) & t\in]-\infty,+\infty[\end{cases}$
Still a circle ? Or is it a curve that touches itself (when $|t|\to\infty$) ? You do not like infinity, fine, I'll change parametrization from $t$ to $\frac 1t$ and include $0$ in my domain of definition. Same question about this curve ?
Of course, this is kind of an artificial example, but you understand that touching and crossing depends a lot of the parametrization chosen. If you consider only the final result, i.e. the graphical display of the curve, then there is no way to distinguish.
Now to come back a little to the original question. Can we, given a fixed parametrization of the curve, know if it is a crossing or a touching ?
The answer is positive. Once you have calculated the double (or multiple) points on the curve, then you can calculate the tangents at these points.
Let's take for instance the parametric case in $\mathbb R^2$.
At the double point $I=(x(t_1),y(t_1))=(x(t_2),y(t_2))$ if the curve is smooth then the tangents will be $(x'(t_1),y'(t_1))$ and $(x'(t_2),y'(t_2))$.
If they are different, we are in case $\#1$, if they are equal we are in case $\#3$, if it is not differentiable we may be in case $\#2$ for instance.
In general you have to study the partial derivatives and their signs to classify these singular points in various categories.
So analytically, given a parametrization it is possible to distinguish a crossing from a touching.
https://en.wikipedia.org/wiki/Singular_point_of_a_curve
The classification is mostly based upon the Taylor expansion of the parametrization in a neighbourhood of the multiple point and to which kind of polynomial it resembles.