1) allocates a Node object Dynamically, NodePtr is some sort of typedef or class wrapper for a pointer http://www.cplusplus.com/doc/tutorial/dynamic/
2/3 ) access some member of the object pointed by temp ( p->x is the same as (*p).x )
The four line look to be part of an insertion function in a list structure