Open a connection to the database. You will need the proper connection string. The place to go is ConnectionStrings.com.
SqlConnection conn = new SqlConnection(yourConnectionString);
Create a command
string yourSQL = "SELECT FirstName FROM Employees";
SqlCommand cmd = new SqlCommand(yourSQL, conn);
Do something with it..
- execute a DataReader
- fill a table with a DataAdapter
That's the basic pattern.