To generate a comment in the result tree, use the xsl:comment instruction.
Generating entity references is more difficult, because entity references do not appear as such in the tree data model: this means they can only be produced at serialization time. Generally it's not a good idea to attempt it: ask yourself carefully WHY you want to do this. If you have a really good reason, then you can achieve it using character maps:
<xsl:output-character character="#" string="&"/>
Of course you can use any character in place of #, it doesn't have to be ASCII.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference