Hi, xquery is just a language that you can use against an xml data type be it a variable or column. You can run it as part of a normal tsql batch.
Here is a good place to get started with:
http://msdn.microsoft.com/en-us/library/ms189075.aspx
but there are 1000's of blogs out there on the subject.. I've done a few posts myself: