Grief is, in general terms, a reaction to the removal of something that was enjoyable. If a favorite person or play partner is no longer around, that can invoke behavioral issues in the remaining animal that range from being subdued or withdrawn to refusing to eat to showing signs of physical problems. Some pets make more or less noise (from yowling for hours to refusing to bark), while some show signs of nightmares or dreams. And some will become very clingy, sticking to a surviving person like glue.
Animals probably do not understand loss in the same way that humans do. The concept of permanent loss is one that humans understand, but pets only know that someone or something they loved is no longer around. But they do seem to understand the concept of death.