How do I connect to a data source

This may sound like an obvious question to most but where do I find this information please? I have the SQL queries ready to input I just need to connect. This is something I have not done before. Any pointers etc welcome.