You need to install Groovy which generally means downloading a zip file, unzipping it somewhere and pointing your PATH to it's bin folder. You can execute groovy scripts directly from the command line using the 'groovy' executable. Or you can compile groovy into byte code and use it just like java code.
Groovy is nice because you can take advanatage of all the existing Java resources you already use every day. You just get to write less code to get your work done. I can't say that it has any advantages over PHP, or any other scripting language for that matter, because
you should always use the right tool for the job. I'm sure in some situations PHP makes more sense. Of course, as a java developer, I'd be hard pressed to find that situation. ;)