Download the tor application from here (this link is unfortunately has not been visible to the me if I just browse around https://www.torproject.org).
You can run the tortor application from the command line and pass it a torrctorrc file containing your required configuration. The application exposes a SOCKS port at 9050 by default.
The manual of the tor for more information.