What flock and cattle are discussed?
Rashi: It is what Amalek pillaged from Negev Yehudah and Negev Kalev.
Why does it say "Nahagu Lifnei ha'Mikneh ha'Hu "?
Rashi: Men led them and went in front of the animals, to glorify and say "this is David's spoils!"
Radak citing his father: The led the spoils in front of their own animals that they saved. 1 Malbim - "ha'Hu" is the animals taken from Tziklag, which verse 19 hints to.
Radak citing Yerushalmi Sanhedrin 2:5: They led the flock in front of the camp, like normal. When they came to a wall, they did not take the flock to the side, rather, they breached the fence and went straight. They justified this - "this is David's spoils", and a king may breach walls to make a path for himself, if needed at the time.
How did everyone recognize his animals? Perhaps they had Simanim on them. (PF)
Why did they say "this is David's spoils"?
Refer to 30:20:1,3.
Malbim: They publicized that they had despaired of their animals, for they had no way to save them, therefore all belonged to the king. (If not for despair, everyone would take back his own.) This was for David's honor, that he divides among his men, like a king dividing spoils to his camp.