I do not understand the following.
If $f$ is a bijection, the $f \circ f^{-1}$ is the identity function on $Y$and $f^{-1} \circ f $ is the identity function on $X$.
I just thought that the identity function is essentially $y=x$?
What does it mean for the ' identity function to be on $Y$ or $X$?'
They mean that it becomes a function from $X$ to $X$ (for the second identity function), or from $Y$ to $Y$ (for the first identity function).
For example, for the second one: $(f^{-1} \circ f) (x) = x$ for any $x \in X$, hence it maps any $x \in X$ to $x$ itself. Hence it is the identity function from $X$ to $X$, which they say is a function 'on' $X$ itself: any function from $X$ to $X$ itself is a function 'on' $X$, whether it is an identity function or not.