How to return XML in SQL Server?

We can use FOR XML statement at the end of the query to return xml data from the SQL Server. 

select * from mytable for xml auto

There are three mode of returning XML and they are auto, raw and explicit