Our own dear Webster 1913 defines a magazine as "A chamber in a gun for holding a number of cartridges to be fed automatically to the piece." The detachable box magazine is a modern subtype of this, one which is a significant part of what makes a modern firearm. As the name suggests, the detachable box magazine is a component which encloses (box) a number of cartridges for a firearm and which can itself be detached from the gun and replaced with another identical magazine for faster and more reliable reloading.
These types of magazines are present, these days, in all manner of firearms from semiautomatic pistols to rifles and even shotguns like the Saiga-12. They arrived in the last decade of the 19th century; it's fairly widely agreed that the 1893 Borchardt C-93 semiautomatic pistol was the first handgun (and maybe the first gun) to use a fully detachable box magazine with integral feed lips, which retained the cartridges in the magazine even when it was not inside the gun. The widely-cited American patent by William Arthur Savage of the detachable box magazine for a .22 long rifle version of the Savage Model 99 was issued in 1908. It appears that the difference between it and the magazine used by the Borchardt lies primarily in the fact that Savage's magazine uses the magazine follower as a slide stop in order to lock the slide open when empty, a common characteristic of modern guns. As a result, claims that Savage 'invented' the detachable box magazine are at best specious. The detachable box magazines used by the 7.65mm Borchardt-Luger pistol (more commonly known as the Luger, and yes, same Borchardt) in 1900 also had an integral slide stop feature - but they used a button protruding from the side of the follower through a slot in the magazine for this purpose, rather than the follower itself.