Not all Meanings of "But" Are Equal!
Much Depends on Whether You Start Out on a Positive Note
The word pero means but -- an adversative conjunction. It is adversative because it redirects the statement immediately preceding it. It is a conjunction because it will be followed by a clause -- containing a conjugated verb. The word pero is used when the introductory clause is an affirmative statement and when what follows does not contradict it but adds to it in some way:
Vamos al teatro pero primero tenemos que comer (We're going to the theater but first we have to eat).
Juan parece estar cansado pero duerme mucho (Juan seems tired but he sleeps a lot).
If the introductory statement is negative, then sino is used. It also translates as but. However, what follows sino contradicts the opening statement. After sino, no conjugated verb is used. Instead, a noun, an adjective or an infinitive may be used:
Juan no es estudiante sino professor (Juan isn't a student, but rather a professor). Note that student and professor are nouns.
Juan no es alto sino bajo (Juan isn't tall, but rather short). Note that alto and bajo are adjectives.
Juan no quiere estudiar sino mirar una película (Juan doesn't want to study, but rather to watch a movie). Note that estudiar and mirar are infinitives.
If such negative statements are followed by a conjugated verb, then que must follow sino -- it is the function of que to introduce a subordinated clause. Clauses, by definition, contain conjugated verbs. Notice that unlike the previous example using an infinitive as the point of contrast, in the following examples, the first clause also concludes with a conjugated verb.
Juan no estudia sino que trabaja (Juan doesn't study, but rather he works).
Juan no es amable sino que maltrata a todos sus colegas (Juan isn't friendly, but rather he mistreats his coworkers).
Juan no estudia mucho sino que pierde su tiempo mirando películas (Juan doesn't study much, but rather he wastes his time watching movies).