You can either use
System.Data.SqlClient
or something like an Entity Data Model. You access specific instances using the connection string.
If, on the other hand you wish to find out what instances are running on a particular machine/network just as Sql Server Management Studio does when you browse for more servers, I'd have a look at SMO:
http://msdn.microsoft.com/en/library/ms212724.aspx[
^]