Theory:

Words that are used to connect sentences, clauses and words - with different ideas, are generally called as conjunctions.
Example:
1. Today morning I saw a beautiful flower in my garden, but it was missing in the evening.
2. Sheela's parents are teachers, and Ravi's parents are doctors.
3. I want an explanation about the project to tell my teachers.
It may be noted that each word (but, and, to) are used in different contextual meaning and cannot be interchanged.
 
Though all three words are used to connect sentences, let us take a look at the differences.
1. And: This connector is used to connect similar sentences that do not negate each other; also used for additions.
 
Example:  
Addition: I like cooking and eating.
Connection of similar ideas: Raghu know how to cook, and he writes recipes for cookbooks.
 
2. But: This connector is  used to connect ideas that are opposite to each other; the phrases or sentences should negate each other.
 
Example:
Negation: I like writing, but my skills are not great.
 
3. To: This preposition is used to connect similar ideas, one sentence supporting the other.
 
Example:
My teacher brought many exhibits to show the class how the solar system works.