These are package management software. Basically designed only for your convenience and nothing more. Homebrew is for Linux and OS X, Macports only for OS X. Primitive example. In order to install Gimp, without using package managers, you'd need to download packages/libraries x and y and then install. Using one of those managers you'd say "I want install Gimp" and that is it. It would download for you and would install. If you wouldn't like it, you could say "Uninstall it, I didn't like", so it would find what was installed, where it was installed, so it could remove finally.
David Clark wrote:Do I need both of them to install Groovy? Why? Do I need to install one before the other? In what order?
You don't need any of those in order to install Groovy.
=David Clark wrote:I have both Netbeans & Intellij IDEs on my Mac.
Choose anyone you like and use one.
I don't want to screw something up on my Mac.
It isn't that easy. If you have one of those package managers, just write:
MacPorts: sudo port install groovy (you'll need enter administrators password)
Homebrew: brew install groovy
I'd suggest you not to mess around with few tens of languages at the same time. Pick one, get basic understanding, then think what do you want next, continue or try something different. Anyway, choosing one or another programming language it depends on what kind of projects you're willing to work. So, define what are your interests in terms of programming?