You can get your database connection details from whoever set up the database. You'll also need to get them to whitelist the Retool IP address:
Create a new resource in Retool, and select "Microsoft SQL" as the type. Enter your database connection details.
We recommend setting up separate resources for read and write access to make it harder to accidentally cause unwanted changes to your database. When setting up a resource to write to your database, you can enable a simplified interface that can make standard SQL write queries to further reduce the chance of errors.
Resources > Add > Microsoft SQL
You can now select your newly-created SQL Server resource from the Resource dropdown when creating queries in your Retool apps.
You can display the results of SQL Server queries as with any other query in Retool: