If $G$ is a finite $p$-group, then its center is non-trivial, which forces that $G$ must be nilpotent.
Consider infinite $p$-groups, i.e. infinite groups in which order of every element is some power of (a common prime) $p$. In such a group, we can not say that center is non-trivial (see this example). In particular, I could say that upper central series of $G$ do not terminates at $G$.
But, this troubles me to conclude whether $G$ is nilpotent or not? I would like to clarify following things related to this. Please help me.
Question 1. What is (are) the definition(s) of infinite nilpotent group which can be looked as generalizations of finite nilpotent groups?
Question 2. If $G$ is an infinite $p$-group, then what conditions on $G$ would guarantee that $Z(G)$ is non-trivial?