The first step to learn Groovy would be to install its IDE. You may use a Downloadable zip package which you can install in your instances and you are good to go.
Groovy for AEM 6.x with Intelligence
AEM Groovy Console provides an interface for running Groovy scripts in the AEM (Adobe CQ) container. What I will try to do is make you familiar with the language through various examples and then you can solve any use case as per your clients business need.
This repository is for some Groovy scripts which are useful in AEM JCR modifications and analysis. It can come in handy whenever you seek to modify JCR content recursively , find some properties in pages, or count anything in JCR nodes.