Ben has it right. Over a long period of time, animals changed slightly until a chicken emerged from the egg. The animal that laid the egg that hatched the chicken? It would have looked similar to a chicken, but wasn't quite there yet. It would be like how a dog that is half border collie half german shepherd wouldn't look exactly like a german shepherd, or a border collie, but you could see the resemblance.
Even the first chicken wouldn't have looked like the chickens we have now. Because we have cultivated them and manipulated their evolution, they have changed quite significantly.
But going back far enough, there would be an animal that didn't lay eggs. That animal would look very different from a chicken. Eventually there were reptiles that started laying eggs, then those reptiles' offspring eventually popped out with feathers. After a long period of time, a chicken popped out.
Conclusion: the egg came first, and it came out of something that wasn't a chicken.
p.s............British researchers say the chicken must have come first as the formation of eggs is only possible thanks to a protein found in the chicken’s ovaries.
How did the chicken get here....that's simple.
I think neither came first - the chicken and egg as we know them are the result of millions of years of evolution. I don't think we'll ever know exactly how life started or how it ended up splitting off into so many different species.