I'm reading a book that defines an order between compactifications of a space like it is shown in the image.
I don't fully understand this definition, however. If the $f$ mapping fixes all points in $ X $, doesn't it mean that $f$ is the identity function?

$f$ is a function whose domain is $dx$, which is strictly larger than $x$. It can fix $x$ without being the identity function everywhere else.
What is really meant is: $c$ embeds $x$ into $cx$, and $d$ embeds $x$ into $dx$. $f$ maps $dx$ to $cx$, and if $f\circ d =c$ then we say $c≤d$.