How does this resistive pull up and resisitive pull down circuit work?
The purpose of the buffer is to reflect the value of the Pin at all times.  For this circuit, all you have to ask yourself is 'what is the Pin doing?'.

Digital buffers are often used to increase the sourcing current capability of the node.  For instance, if the resistor is in the path, then the Pin can't source very much current.  The buffer takes care of that part only while accurately reflecting the state of Pin.