"Build a ramp outside of it for the enemies to get inside." Jerusalem had a wall around it to protect the people inside. The enemies could only get inside if they had a ramp to climb up over the wall.
"Set around it huge poles people would use to break down the gates and get inside." "Battering rams" are large trees or poles that many men in an army would pick up and hit against a wall or door to break it down and get inside.