You can get Homebrew by following the instructions on it’s website.
Homebrew makes your life a lot easier when it comes to installing applications and languages on a Mac OS. Here is a Step by Step guide to installing Scala and Apache Spark on MacOS. By Jose Marcial Portilla How to Install Scala and Apache Spark on MacOS