What is brew?
Homebrew installs the stuff you need that Apple didn’t. (source)
How to install
Open your terminal (You can use Spotlight Search, press command + space bar and type terminal then press enter).
Add the following code:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
And Finally press enter, the last code will install brew in your terminal just follow the steps.
To test the installation type the following:
brew info
You will get something like:
4 kegs, 14148 files, 1.1G