Follow the website's instructions.
As of the time of writing, this is the current installation command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Don't neglect to perform the post-installation steps notated in the installation output.
Homebrew collects analytics to help the maintainers with the software. However, if you want to opt out of Homebrew’s analytics, you can set this variable in your environment:
export HOMEBREW_NO_ANALYTICS=1
Alternatively, this will prevent analytics from ever being sent:
brew analytics off