This is a hard question, for a scientist and for a philosopher too!
We think of consciousness as the ability to be aware of ourselves, our actions and other people and things around us. For example, if I do something wrong, like say shout at my friend when she is being nice to me, I will feel bad or embarrassed about it afterwards. I know that what I did was wrong and I can sense that she is hurt or offended. Other animals can also be very intelligent but do not seem to be aware of themselves, at least not to the degree humans are. For example, I feed my lovely cat every day and pet her and I am nice to her but sometimes she will just bite me and run off (sob sob). She has instincts, and some degree of intelligence but doesn’t seem to be aware of herself or her actions or of my existence.
Where consciences consciousness comes form, is another question that I think we do not have the answer to. Why do humans have consciousness but not other animals? Neuroscientists who are scientists who study the brain are very interested in this question, but I think are still far away from having an answer for it.