Meaning: This sentence tells us that the dog continued to live its life feeling happy and content for the rest of its days.
Choice of Words: The word "dog" refers to a four-legged pet animal commonly kept by people. "Lived" means to be alive. "Happily" means feeling or showing pleasure or contentment. "Ever after" means for the rest of time.