What you see is called the gate of heaven or Torii. In Japan it is present in many places and temples .. is a key monument of this religion called Shinto, and is like a portal for access to a sacred area. Before passing through you should bow (practice used not as often... I have seen few people bow).