A siege comes from the Latin for "to sit" (it out). Sieges work when an army can surround a fortress or city of another. They then sit it out until the people inside starve. This saves losing men in a fight against the city gates and walls, but it can take a long time. Sieges were needed because castles in particular were built so strongly that they could rarely be taken by an attack - until the days of cannon, which changed everything.
The siege did have the advantage that the two sides could talk with one another about whether the people inside the castle would give up, and on what terms.
But there were additional things that the siege army could do besides simply sitting it out. They could use siege engines to throw rocks over the walls, or to throw burning materials into the castle or city with the hope it would catch buildings alight. They could also throw rotting and diseased corpses over the walls in the hope of spreading disease.
Sieges could take months or years. They have no place today because the fortified position can be bombarded with so much firepower it can be reduced to rubble quickly.