vs
QUICK ANSWER
"Pero" is a conjunction which is often translated as "but", and "y" is a conjunction which is often translated as "and". Learn more about the difference between "pero" and "y" below.
pero(
peh
-
roh
)A conjunction is a word that connects words, phrases, clauses, or sentences (e.g., The cat and the dog slept.).
a. but 
Te quiero comprar algo, pero no tengo dinero.I want to buy you something but I don't have any money.
A masculine noun is used with masculine articles and adjectives (e.g., el hombre guapo, el sol amarillo).
y(
ee
)A conjunction is a word that connects words, phrases, clauses, or sentences (e.g., The cat and the dog slept.).
a.  no direct translation
This refers to an idiomatic word or phrase for which there is no word-for-word translation.
¿Y Juan dónde está?So, where is Juan?
¿Y cuál es el problema?What is the problem?
A feminine noun is almost always used with feminine articles and adjectives (e.g., la mujer bonita, la luna llena).