I have no idea how to prove that the set $\{(x, |x|): x\in\mathbb{R}\}$ is not the image of an immersion of $\mathbb{R}$ into $\mathbb{R}^2$
For example
If $f(t)=(t^3, |t|^3)$ then $f'(0)=(0, 0)$.
I have no idea how to prove that the set $\{(x, |x|): x\in\mathbb{R}\}$ is not the image of an immersion of $\mathbb{R}$ into $\mathbb{R}^2$
For example
If $f(t)=(t^3, |t|^3)$ then $f'(0)=(0, 0)$.
On
The proof is basically that, near a preimage of $(0,0)$ the map $f$ has to be close to its linear approximation, which is a non-trivial line because the map is an immersion. But no line is close to the set $\{(t,|t|): t \in \mathbb{R}\}$ near $(0,0)$.
Here are the gory details for one way of making this precise:
Suppose it is. Then we have $f: \mathbb{R} \rightarrow \mathbb{R}^2$ the immersion. Let $p \in M$ be such that $f(p) = (0,0)$. Let $f'(p) = (a,b) \neq (0,0)$.
By Taylor's theorem (or just the definition of the derivative), we have $f(p+x) = f(p) + (a,b)x + o(x)$. That is, given $\epsilon > 0$ there exists $\delta > 0$ such that $|f(p+x) - f(p) - (a,b) x| < \epsilon |x|$ for $|x| < \delta$.
Now the point is that $f$ is close to this line, and by zooming in close enough we can make sure it's within any given angle of this line. The rest is just $\epsilon$ pushing, but I'll do it out to show that if we take $|x|$ small enough, the $y$-value of $f(p+x)$ must be positive but that $f(p-x)$ must be close to $-f(p+x)$, giving a contradiction.
Plugging in $f(p) = (0,0)$ we get $|f(p+x) - (a,b)x| < \epsilon |x|$. This implies $|f(p+x)| > (|(a,b)| - \epsilon)|x|$. Because the image of $f$ lies in the set $\{(t,|t|): t \in \mathbb{R}\}$ we have $f_2(p+x) > \frac{|(a,b)| - \epsilon}{\sqrt{2}} |x|$, where $f = (f_1, f_2)$, i.e. $f_2$ denotes the second coordinate of $f$.
Note also that $|f(p+x) + f(p-x)| < |f(p+x) - (a,b) x| + |(a,b) x + f(p-x)| < 2 \epsilon |x|$.
Thus $|f_2(p+x) + f_2(p-x)| < 2\epsilon|x|$. Thus $f_2(p-x) < (\frac{-|(a,b)|+\epsilon}{\sqrt{2}} + 2\epsilon) |x|$.
Choose $\epsilon$ small enough, i.e $\epsilon < \frac{|(a,b)|/\sqrt{2}}{2+1/\sqrt{2}}$. Then $f_2(p-x) < 0$. This contradicts the fact that the image of $f$ has positive $y$ values.
My answer assumes only that the immersion is $C^1$. Let us denote this immersion by $x \mapsto (f(x), |f(x)|)$, where $f$ and $|f|$ are (by assumption) $C^1$ functions on the real line. It is easy to see that $f'(x) \neq 0$ for all $x \in \mathbb{R}$, for otherwise we would have also $|f|'(x) = 0$, and it would not be an immersion at that point. Let us assume without loss of generality that $f(0) = 0$ (for some point must be sent by the immersion to $(0, 0)$). Since $f'(0) \neq 0$ and $f$ is $C^1$, there must be some tiny interval $I$ around $0$ where $f$ is strictly monotone. Let $J = f(I)$ and let $g : J \rightarrow I$ be its ($C^1$) inverse. Now the composition of functions $|f| \circ g : J \rightarrow \mathbb{R}$ equals the absolute value function restricted to $J$. By our hypothesis, it must be $C^1$; however, $J$ contains $0$, so this is clearly absurd.