In this symbolic act, they poured oil on David's head to show that he was selected to be the king.
"the tribe of Judah"
This is the name of a town in the region of Gilead.