For most of our history as humans, it's always been thought that animals don't possess consciousness like we do, but this idea was put up to debate when the theory of evolution in living beings came around. It's almost agreed on by most scientists that most animals possess some kind of consciousness.
When we want to describe consciousness, we probably compare it with not being conscious. In that sense, consciousness means experiencing things, but what is experiencing things? That's where defining something by comparing it with a state where it's not there falls short.
Throughout history, consciousness has been explained in many different ways. For tens of thousands of years, it's been thought that consciousness is the existence of a soul in a being, something that many people still believe in even today. In a scientific sense, however, consciousness is the quality or state of being aware especially of something within oneself.
The general definition of consciousness can be easily applied to a lot of living beings, like how a predator can sense its prey. But the much more complex definition is self-consciousness, which is thinking that we're thinking, being aware of our own actions, and having a sense of identity.
Even today, there aren't many ways to determine whether a living being possesses self-awareness or not. The main method used today is the mirror test. Basically, this test is done by putting a mirror in an animal's habitat and observing how they react. If the animal recognizes themselves in the mirror, it means the animal has a sense of self according to the test, and, to prove it further, the one doing the experiment can try to change the animal's appearance, such as by putting a mark using dye on them on a place they can see in the mirror. Self-aware animals will try to get rid of the mark or otherwise interact with it.
Animals that have passed the mirror test include Great Apes, dolphins, Asian Elephants, and Eurasian Magpies. But the mirror test has its fair share of controversy. Many people find it hard to accept that other beings may have similar levels of self-awareness to humans, especially with the test showing that even us humans can't recognize ourselves in a mirror until we're around 2 years old. The other major issue is that lots of animals don't primarily recognize the world by vision, such as dogs which primarily use their sense of smell.

Even without the mirror test, some animals show "human-like" behavior, such as elephants, which have complex societies, and have been observed mourning their dead by standing around their remains in silence for long periods of time, and sometimes carrying some of their bones and tusks when they leave.
This may show that elephants understand the concept of mortality just like humans. They even show empathy sometimes, according to a 2014 study published in journal PeerJ, they may try to comfort other elephants when they sense that they're in distress, by using their trunks to caress the distressed elephant.
So, maybe it's time to change our views about our non-human peers, maybe I'm just overthinking it, but they're probably a whole lot more similar to us than our ancestors used to think.