Yes, that is exactly what is talked about when discussing XSS vulnerabilities. In the context you described, one could also add code to redirect a user to any site or present possibly malicious code directly from that website. Changing the target of password forms, posting cookies to other websites and many other malicious acts are possible.
Have a look at this if you don't understand what xss is. http://theinsider.deep-ice.com/texts/xss_exposed.txt
You can try all your xss stuff on demo.testfire.net
That is one example of what xss can be used for (to appear to have defaced the site and give wrong information to a user, it can also be used for defacement but not going to explain that here.)
Something like this would work post it in the search bar: window.location="http://HomePC.MyISP.com"