Jesus prepared to enter Jerusalem as king, but not as a king in anyway known to man. He would enter on a donkey and would enter in order to be killed.
Preparations for this time had been made long ago and everything was ready. Two of his disciples were sent ahead to get he colt.
Jesus entered Jerusalem to loud cries of acclamation because of all the miracles that He had done. This would include the raising of Lazarus and the healing of blind Bartimaeus.
The Pharisees objected to the crowds shouting out, but Jesus declared that if the people kept quiet the stones themselves would shout out. The world was created out of God's glory and for God's glory. Man may try all he likes to stop God being praised but he will not succeed.
Then Jesus wept over Jerusalem. He knew what was about to happen. His sorrow is not for what He would go through, but for the people. The messiah had come, the One who would save them. If they had only turned to Him they would have had peace, but instead destruction would come. This is an allusion to the siege and destruction of Jerusalem in AD66-70, as maybe v27 as well. Note the implication that AD70 was a consequence of Israel's rejection of Christ.