There are so many articles available, which explains the use of Command and Connection object in Ado.Net. Few of them are as below:
http://www.c-sharpcorner.com/UploadFile/c5c6e2/working-with-command-object/
http://www.c-sharpcorner.com/uploadfile/mahesh/connection-object-in-ado-net/
http://csharp.net-informations.com/data-providers/csharp-ado.net-connection.htm
Connection Object:
Connection object is the basic Ado.Net component used to create a link between your application to your data source. So you define a connection string which you can use to initialize a connection to your datasource.
Command Object:
Command object is another Ado.Net component used to execute queries against your datasource using connection object. So basically you need connection and command object to execute queries on your datasource. Using Command object you can execute inline queries, stored procedure, etc.
A sample code:
SqlConnection con = new SqlConnection(connectionString); // creates object of connection and pass the connection string to the constructor
SqlCommand cmd = new SqlCommand(); // creates object of command
cmd.Connection = con; // tells command object about connection, where the query should be fired
cmd.CommandText = "Query"; // your query will go here
cmd.CommandType = System.Data.CommandType.Text; // it tells the command type which can be text, stored procedure
con.Open(); // opens the connection to datasource
var result = cmd.ExecuteReader(); // executes the query on datasource using command object
con.Close(); // closes the connection
I hope this will help you. :)