It seems that David had hidden behind a pile of earth or stones.
David bowed before Jonathan, who was still the King's son. Also, this was the last time they met together.