Any non-whitespace inside a template is automatically copied to the output.
Whitespace that contains a non-whitespace character is copied as well:
<xsl:template match="foo"> some text </xsl:template>
Whitespace between elements is "stripped" and not copied:
<xsl:template match="foo"> <p>some text</p> </xsl:template>
generates the following without a leading or trailing carriage return:
<p>some text</p>