Before you start
Search for the package name and inspect its description and dependencies. A formula is generally used for command-line programs and libraries; a cask generally describes a macOS application.
Steps
Install the exact formula after checking it is the one you want. Homebrew may install dependencies as part of the operation.
brew search wget
brew info wget
brew install wgetUsing Casklane
In Casklane, use Install Package, enter the formula name, and choose Install. Review the operation output and confirm that installation succeeds.