The jug must be filled with water five times, which is gathered from five different wayshrines, after the Dragonborn has done this it will become empty. It is given to the Dragonborn by Knight-Paladin Gelebor.
It is also used as a key to the altars inside the Inner Sanctum. Activating the altar will place the jug on it and activate the connected door. Activating the altar again will take the jug back, closing the door, although it is possible to activate it – retrieving the ewer – as you run through the door. Another altar on the other side will open it again.