There are all sorts of penetration tools that will automatically find all the doors, windows and mouseholes in your application and enter executable data there to see what happens. The simplest manual test is to enter this line:
and look for a popup box containing the word "BOO!" as you traverse your application. If your application shows that popup you found a potential security hole. Someone who is much craftier than you may be able to exploit that hole to do something much worse.
There are other types of injection attacks, including XPATH and SQL injection. I highly recomment visiting www.owasp.org and reading up on these fascinating topics.