Terms like grandma and grandpa are capitalized when they are used as titles that refer to someone or something, rather than a regular common noun.
For example, if you were to say, "Let's go to Grandma's house," then that would be capitalized because you are referring to your grandmother with a title, instead of saying "Let's go to my grandma's house," where you are simply stating a noun.
In short, think of titles like names. It's kind of like saying "boy" v.s. "Adam" if you think about it. Hope this helped!