At the risk of over-simplifying, medieval artillery was essentially of two types: those for use against enemy troops, and those for assulting fortifications, although each might be used for either purpose during a siege, by both attackers and defenders.
Anti-personnel artillery were referred to by names such as ballista or springald and, like their classical forebears (as illustrated above), were designed to project missiles such as balls, spears, or rods, rather like a very large-scale crossbow. They were primarily defensive and their projectiles could do quite a bit of damage to an advancing mass of hostile troops. Accuracy and range were good, but rate of fire was slow. A number of towns are known to have invested in such artillery, to station atop their wall-towers or gateways.
The second type was a catapult, used to fling heavy missiles (e.g. rocks) against defensive fortifications, with a view to breaking through them which usually required repeated strikes in the same spot or casting projectiles (e.g. flaming objects) over the top of fortifications. Mangonels and trebuchets were the most common types of catapult, the latter being the more powerful. Defenders might use such devices to discourage attacking forces. However, towns rarely seem to have invested in this type of large artillery, since they preferred to rely on their walls as the point of defence. Yet a number of towns (e.g. Berwick) likely faced such machines at some point in their history. As with ballista, catapults had a slow rate of fire.
The Warwick Castle trebuchet stands 18 metres high and weighs weighs 22 tons. A machine of this size needed to be built at the site of a siege, for it was too heavy to transport from place to place. It was time-consuming to build, slow to reload, and battering through a stone wall needed multiple hits on target. Given the challenges of supplying a besieging force and its horses (which consumed huge amounts of feed), as well as of removing its waste materials, along with the risk of arrival of a relief force, the preferred strategy seems to have been to project missiles over walls, to create enough damage in the urban interior to demoralize the residents and persuade them to surrender. This tactic was used by English besiegers of Berwick in 1333, for example, when the Scots then in possession agreed to surrender if not soon relieved; Berwick changed hands after the Scottish relief force was defeated at Halidon Hill.
When gunpowder artillery was first introduced, it was as siege or anti-personnel weapons, and perhaps more for psychological effect than for effectiveness. Only as larger guns were developed could they be applied usefully to besieging stone fortifications. A single shot from a powerful cannon could smash through a town wall, as Berwick discovered in 1405. It became necessary to reinforce walls so that they could better absorb the shock of cannon-ball impact or to adapt existing fortifications to accommodate guns in positions that would allow them to be aimed at the artillery of besiegers.
Gunports for hand-guns were inserted into fortifications at several towns in the last decades of the fourteenth century; they were usually distributed around the outward face of towers, to permit a wide field of fire, including flanking fire towards adjacent sections of walls. A number of towns are seen acquiring, or in possession of, guns between the 1380s and 1480s: London, Southampton, Norwich, Lynn, Rye, Exeter, Coventry; the list can be expanded if we can infer ownership from expenditure on gunpowder or its ingredients, or on manufacture of pellets or stones (although these might have been for use with conventional artillery). Early town cannon were smaller, more portable examples (field artillery types) for mounting on fortifications when danger threatened, none comparing with the famous Mons Meg.
Guns small enough to be held and fired by one individual may have been present in England from the late fourteenth century. They were not much used during the civil war of the fifteenth (although Edward IV had a large contingent of Flemish gunners at his victory at Tewkesbury), as handguns had a less rapid rate of fire and were less reliable (particularly in wet conditions) than the longbow. But their use was easily taught and did not require years of physical and skill development. As technology improved, within a century handguns superseded longbows and crossbows in warfare.