Answer: As you probably already know if you're asking the question, both pero and sino are coordinating conjunctions (connecting two words or phrases of similar grammatical status) meaning "but." As such, both pero and sino can be used to contrast two words, sentences or phrases.
Generally, the conjunction to be used to indicate a contrast is pero. But sino is used instead when two things are true: when the part of the sentence coming before the conjunction is stated in the negative, and when the part after the conjunction directly contradicts what is negated in the first part. In mathematical-like terms, sino is used for "but" in sentences of type "not A but B" when A contradicts B. The examples below should make this clear.
Sentences using either pero or sino in this way can be translated using "but." In almost all cases, "rather," "but rather" or "instead" also could be used as an appropriate translation where sino is used, but not for pero.
Here are some examples of pero in use:
- Me gustaría salir, pero no puedo. (I would like to leave, but I can't.) The first part of the sentence isn't stated in the negative, so pero is used.
- María es alta pero no es fuerte. (Mary is tall, but she isn't strong.) The first part of the sentence isn't stated in the negative, so pero is used.
- Los huevos son fritos pero no revueltos. (The eggs are fried but not scrambled.) Again, the first part of the sentence is stated in the affirmative.
- María no es alta pero es inteligente. (Mary isn't tall, but she's intelligent.) Although the first part of this sentence is in the negative, pero is used because there's no direct contrast.
- No son muchos pero buenos. (There aren't many, but they're good.) Again, there's no direct contrast, so pero is used.
- El virus Código Rojo no afecta usuarios, pero Sircam no remite. (The Code Red virus doesn't affect users, but Sircam doesn't let up.) The two parts of this sentence are used as a comparison rather than a contrast, so pero is used.
Here are some examples of sino:
- María no es alta sino baja. (Mary isn't tall, but short, or Mary isn't tall, rather she's short.) There's a direct contrast between alta (tall) and baja (short).
- No creemos lo que vemos, sino que vemos lo que creemos. (We don't believe what we see, but we see what we believe, or we don't believe what we see, rather we see what we believe.) There's a clear and direct contrast between cause and effect used in this sentence.
- El protagonista no era conde sino señor. (The protagonist wasn't a count but a lord, or the protagonist wasn't a count, rather he was a lord.) Although conde and señor aren't opposites, they are used in this sentence to contrast each other.
- No he venido a ser servido sino a servir. (I haven't come to be served but to serve, or I haven't come to be served; instead I have come to serve.) Again, there's a direct contrast between the two purposes stated in the sentence.