As mentioned in the comment above by @SteffenUllrich - when you install Tor on your system, part of the setup includes a SOCKS5 proxy running locally that routes to the Tor network. By default, the SOCKS5 proxy runs on local port 9050.
You can run a simple test using
curl to send a request to a web server through Tor:
curl --socks5-hostname localhost:9050 https://www.whatismyip.com/
The response from whatismyip.com should show the IP address of the Tor exit node, instead of your own.
Hopefully this simple example points you in the right direction. If you are using a higher level language (such as python) to write your scripts, then the library for making https requests may include a provision for routing the request through a proxy. For example, in python, this can be done using the
requests library (see https://docs.python-requests.org/en/latest/user/advanced/#proxies for more info).