how do I get reference to a parent or a child?

What I want to do is basically access a Parent or a child object.

parent:

transform.parent

childs:

simple foreach or transform.GetChild(int index)

how do I get parent object of parent object from a script?