An op amp is a differential amplifier. This means that when there is no difference between the two inputs, e.g. when the inputs are shorted together, there should be no voltage on the output. Unfortunately under these circumstances there is always a small offset because no op amp is never perfect and completely balanced. There is always a small input offset voltage. This input offset voltage is small and arises from mismatches in the differential input stage of the op amp chip. These small offsets are caused by a variety of unavoidable issues within the manufacture of the op amp. It is possible to add some additional connections to enable the results mismatches in the chip to be significantly reduced. Using an offset null capability it is possible to reduce the level of the offset voltage significantly. The Two pins which you have asked is serves the same function.