Gun Accessories/Useful Notes

Muzzle
The bit the bullets come out of. On a rifle, you'll usually have a device called a flash hider which redirects propellant gas outwards to make the muzzle flash a little less blinding. The barrel might be threaded, meaning it has a screw thread at the end to make it easier to attach a silencer or some types of rifle grenade. You might also have:

Handguard / barrel
On anything bigger than a pistol, this is typically one of the parts you're supposed to hold on to. But you can also stick stuff to it:
 * As above, laser sights, flashlights, bipods, foregrips, and cameras might be mounted to the handguard rather than further forward.
 * Usually, the front end of a sling or shoulder strap will attach near the front of the weapon's barrel.
 * A front vertical grip is similar to the rear pistol grip, but it's at the front; can be anything from a simple cloth strap to hold on to, to a fixed grip or folding handle. Useful in close quarter situations where speed and handling are more important than accuracy, but elsewhere lowers accuracy, makes the gun front-heavy and tends to snag on things when you least want it to. Pistols are sometimes designed to be able to attach an upside-down magazine under the barrel for use as a foregrip. Vertical grips can also have integrated lights, laser pointers, or even fold-out bipod legs. As politicians have no idea how guns actually work, attaching one of these to a legal pistol in the United States without government permission turns it into a highly illegal "Any Other Weapon" punishable by 10 years in prison and $250,000 in fines.
 * Many weapons have quick-change barrels; in automatics, this is so that hot barrels can be swapped out quickly, but other weapons can swap barrel lengths; short and light barrels for close-quarters work, or longer and heavier barrels for precision shooting.
 * Underbarrel accessories are whole other weapons that can be mounted under the handguard; the most common is an underbarrel Grenade Launcher, though there are also underbarrel shotguns for door breaching (often simply sawed off shotguns), underbarrel flare launchers for riot control or pretending you have an underbarrel grenade launcher, and more exotic devices like a spring-powered glass breaking spike. If you're feeling silly, you might go for an underbarrel pistol.
 * A barrel shroud is a shoulder thing that goes up a cover for the barrel that helps to prevent burns to the hands and other body parts during prolonged automatic fire; it's often also vented reduce weight and allow air flow over the barrel to slow heating. Typically the term heat shield is used instead if it only forms part of the handguard, as on some shotguns.
 * A water or oil jacket or finned barrel is used to keep automatic weapons cool; the former is a heavy sheath that fits over the barrel and is filled with liquid, and is usually only seen on World War 1-vintage heavy machine guns like the old Vickers MG or some Soviet autocannons. There are many variations of the latter, all with the common goal of increasing the surface area of the barrel to ease heat transfer.
 * A rib is a structure usually seen on shotguns (though some revolvers have one). It's a flat topped bar that runs along the top of the barrel; a solid rib is solid, while a vented rib has cooling holes in it. The rib provides a flat sight plane along the top of the barrel and lessens mirage distortions produced by a hot barrel: the vents prevent thermal expansion of the barrel distorting the rib, which could otherwise potentially result in the front sight shifting position or even the rib cracking or breaking off.
 * You might mount a clamp or other attachment for spare magazines here, so they're closer to hand for fast reloads. Shotguns can be fitted with a holder for spare shells.
 * A pistol can have additional grooves cut here to allow the slide to be operated by the front as well as the back.
 * A Mirage Band (see top image) is a lightweight cloth band designed to be stretched over the top of the barrel, to prevent heat distortions from a hot barrel affecting use of the scope.
 * Your weapon's carrying handle might be mounted here if it isn't mounted on the receiver; this is particularly the case with fold-down handles like the one on the FN FAL.
 * Some weapons, particularly the AK series, have provision for mounting their cleaning rod under or alongside the barrel. This design goes back to the days of muzzleloading firearms, when almost all guns mounted their ramrod in the same position for easy access.

Sights / receiver
Your gun's no good if you can't aim it (not that this stops some people). Your basic weapon will likely have some kind of iron sights; there are plenty of permutations, including illuminated iron sights and flip-up tangent sights calibrated for indirect fire, but for those wanting something a little more substantial there's plenty of options. Note that you can mount multiple scopes in a row; for example, a sniper scope might have a separate night sight attached to the front of it. Scopes might have a BUIS (Back-Up Iron Sight) mounted on them, or be mounted in such a way that the regular iron sight is still usable.
 * A flip-up grenade sight can be mounted on the receiver or handguard of weapons that accept underbarrel grenade launchers.
 * A reflex sight reflects an image of a reticle onto a piece of glass. There are several methods of illumination, from simple LEDs to holographic systems and luminous radioisotopes. Typically divided into "tube" reflex sights like the famous Aimpoint optics which are contained within a scope tube, and "open" reflex sights like those produced by EOTech which are simply a little window to look through. Sometimes miniature open sights are mounted on other sights, for use at close quarters when the main scope wouldn't be workable.
 * A separate magnifier can be used with the above for more precise aim.
 * A scope can be anything from a simple tube with a crosshair to a gloriously overcomplicated piece of precision engineering with loads of twiddly little wheels to adjust more or less anything you can think of. Some integrate illumination, passive IR, laser rangefinders, and all manner of other fun stuff.
 * IR scopes are cameras that see heat; they're used chiefly at night or in the dark. Some older weapons used active infra-red scopes, which featured a large IR lamp to illuminate the target.
 * Other night vision sights use processes like image intensification to produce a useful image in near-complete darkness.
 * Computerized scopes usually have some combination of the above.
 * Your sight itself might have some embellishments; a sight protector is common, either a flip-open cap or two cups, sometimes joined with elastic, that fit over the ends. Other parts include a sun shade (a tube or lip at the front of the scope designed to reduce glare when the sun is overhead) or an anti-reflection device; this uses a honeycomb filter that slightly reduces the light level of the scope, but also reduces glare and eliminates reflection from the lens; previously, snipers might use grease or other substances on the lens to produce a similar effect. For obvious reasons, the latter doesn't tend to see much use in movies or video games, where snipers are usually trying their level best to be seen. At the other end, you might have a rubber eyepiece designed to protect the shooter's eye from being hit by the back end of the scope.
 * Slope indicators (or clinometers for the technical) and anti-cant indicators are typically attached to either the scope itself or its mounting rings. They are used, respectively, to show the elevation of the rifle and to ensure it is level; the former is chiefly used when shooting up or downhill, and involves math. Some people combine both.
 * Finally, a cool scope needs a cool reticle. The simplest would be the dot used as the aiming point on some reflex sights; simplest for a proper scope a straightforward crosshair, which on older scopes is precisely that, two hairs or strands of spider silk forming a cross inside the scope. By why stop at simple? Modern sights are usually etched on a piece of glass inside the scope tube, and can incorporate additional marks for bullet drop, leading moving targets, and windage adjustments; some of the marks might also be illuminated so the scope can be used more easily in dark conditions. Perhaps the most recognizable cool reticle is the one used by the Russian SVD marksman rifle's PSO-1 scope, which has a stadiametric rangefinder (the graph-like section in the lower left). This is used by finding a target of defined size (in this case, 1.7 meters, a human-sized object), putting it between the top and bottom lines, and reading off the range figure above as that many hundred meters. You can go for something ridiculously complicated if you feel so inclined.
 * A sniper might have extra gear to go with their scope; "sniper weapon systems" these days typically consist of the rifle, match grade ammunition, rifle scope, a ballistic computer (a ruggedised PDA with special software) a set of printed data tables in case the PDA fails, a spotting scope (basically a small telescope; old-school snipers would often be issued an actual telescope) or rangefinding binoculars, and a handheld weather sensor. The latter is used to gather data for the ballistic computer, which then calculates the adjustments needed to make a given shot.
 * Weapons designed for indirect fire might have a ballistic data table physically printed onto part of the gun, as with the third image of the AGS-17 here.
 * A machine gun or other heavy automatic weapon might be issued with a dedicated anti-aircraft sight, with the crew using a scale and calipers to measure the speed of an aircraft in order to work out how far to lead their shots.
 * Also often found on top of the receiver is any carrying handle the weapon might have; a fairly common design choice is to integrate the rear sight and carrying handle.
 * Lower down on the receiver, you might have a deflector mounted near the ejection port. This is a piece of metal designed to deflect ejected rounds downwards. Bigger guns might have a brass catcher or bag; this is particularly true of crew-served weapons where flying brass might present a hazard for the crew. Here, it's typically a net or canvas bag. On helicopters, guns are typically fitted with long, flexible tubes over the ejection port to ensure ejected brass can't interfere with the rotors or enter the engine.
 * A dust cover is a panel over the ejection port that closes when the weapon isn't being used, and typically locks open when it's being fired.

Magazine
Them bullets have got to go somewhere, after all. Some weapons (most manual rifles and shotguns) have an integral magazine, which is a part of the weapon and is loaded using single rounds or stripper clips. Others have a detachable box magazine, usually straight or curved; this consists of a casing with a spring at the base containing one or more columns of bullets. But you might also go with:
 * An extended magazine. Typically this will be blatantly enlarged, and might be truly bizarre; for example, there exists a 100-round AK magazine which is a half-circle, the other end attaching to the rifle's bayonet lug. Smaller extended magazines exist as well, such as 50-round magazines for NATO 5.56mm weapons (they look similar, just longer, and tend to prevent prone firing due to their size).
 * A drum magazine. This is typically a very large and rather heavy (and often rather unreliable) device, usually circular and fitted underneath the weapon. The "Beta C-Mag" ("century magazine") is rather common in fiction; it consists of two 50-round drums with a column in the middle. Some machine guns (usually older ones) can mount a saddle drum magazine, which works on the same principle but fits to the top of the receiver rather than the bottom.
 * A subtype of drum magazine is the helical magazine, a cylinder-shaped magazine with the bullets essentially wrapped around an auger (see last two images). Most firearms that use these are designed specifically for them, though conversion kits are starting to appear for others. They tend to have enormous capacity, though they're relatively complicated and expensive.
 * Similarly, pan magazines are often used as a compact way to feed machine-guns. One advantage of pan magazines is that rimmed ammo, which the standard cartridges of most countries was during the two World Wars, works fine while a box magazine will not. The universal adoption of rimless cartridges contributed to the decline of their use. The American 180 takes the capacity to extremes, with magazines of up to 275 round capacity available.
 * Multiple magazines attached together. Sometimes the magazines themselves are designed to clip to each other, like the HK G36's magazine; if not this can be done with a proper clamp, but it's more often shown done with duct tape. The classic version, with one magazine upside-down while the other is in the weapon, is actually a horrible idea, since it can easily result in bullets getting knocked out or the feed lips of the magazine being damaged, and takes more effort than side-by-side magazines to actually use anyway. Taping them together side-by-side is an equally bad idea, as the locking part of the magazine tends to get bent from abuse and therefore won't feed. Basically, don't tape magazines together. Use a clamp.
 * Automatics might use a belt box instead of a magazine; this can be made of anything from cloth wrapped around metal ribs to stamped metal.
 * Soldiers often wrap tape around the base of a magazine to make it easier to handle, since it's usually smooth; companies such as Magpul now make slide-on grips, purpose-built magazine baseplates which include grips, and even whole magazines with gripped sides. Other options include transparent polymer magazines so you can more easily see how much ammunition you have left (with the downside that so can everyone else). Tape is also commonly wrapped around the base of a magazine to differentiate one end from another, which can be difficult in the heat of the moment, as most magazines are symmetrical. Tape can also be used to signify different bullet types within the magazine.
 * Pistol magazines might instead be fitted with Slam Pads.
 * Break-open or swing-out cylinder revolvers can use a speedloader or moon clip / Half-Moon Clip to reload chambers together rather than having to insert rounds one at a time.
 * A magazine loader is used when filling an internal or detachable magazine with single rounds or from stripper clips; there are several ways these can function, from simply providing a guide to slide the clip into to holding down rounds against the pressure of the magazine's spring, to handle-operated loading tools that function like hoppers. Some rifles have integral clip guides that fulfil the same function as the former.
 * You might also carry multiple types of ammunition; for example, armor piercing bullets, or something more unorthodox.

Grip
The part you hold on to. Rifles and shotguns often have the grip as the front of the stock, while a pistol grip is more normal for other long guns (and pistols, weirdly enough). There's plenty of scope for switching the grip around on most widely-manufactured firearms. Also:


 * Modifying a weapon that doesn't have one to use a pistol grip is a fairly common step in the creation of tacticool weaponry. The Mosin-abomination near the bottom of the page is such a conversion.
 * Target rifles and pistols often have a palm shelf, a block at the base of the grip used to support the heel of the hand.
 * A trigger lock is used to secure a weapon you don't intend yourself or others to use immediately; they're most commonly marketed to parents worried about children playing with guns.
 * Professional soldiers may put spare batteries or other essential parts for their weapons or accessories into the hollow of their assault rifle's grip. They then seal this up with tape. Should a key device run out of charge on mission, replacement batters are right on hand.

Stock
The part that goes against your shoulder. Most pistols don't have a stock by default, but some can accept one as an accessory, typically ones designed for burst or fully automatic fire (note that putting a stock on a pistol is highly illegal in many jurisdictions, unless you attach a huge barrel extension that defeats the purpose of having a pistol in the first place). Most other personal weapons have a stock of some kind.
 * Folding / collapsible stocks are designed to be stowable when not in use; they might fold to the side, underneath, over the top to sit over the barrel when not in use, or be mounted on a slider and push back against the rear of the gun. (Bonus points: check various media for weapons with folding stocks that are folded during operation)
 * Modern generations of collapsible stocks, such as the Crane stock, can have watertight compartments within the stock in order to hold extra batteries to keep all of your other gadgets going.
 * Fixed stocks come in many shapes and sizes, from solid blocks of metal or plastic, to ones with a cleaning kit and spare parts in an internal compartment, to full-adjustable setups with all kinds of wheels and sliders and screws to mess around with. Might include a cheek rest.
 * You might also have a cushioned pad here to protect your shoulder when firing.
 * One end of your weapon's sling or shoulder strap will probably attach here.
 * The stock might also feature a monopod to balance the weapon off the ground when using a bipod.
 * A stock saddle is a cloth slip for the stock with a number of loops for holding individual spare rounds of ammunition; they're most commonly used with shotguns intended for combat, since they allow the weapon's tube magazine to be topped up quickly and without taking the muzzle off the target.

RIS and RAS
Rail Integration System and Rail Adaptor System. Also known as Picatinny and Weaver rails, these are standardized ribbed accessory mounting rails that look cool and therefore go everywhere. Most of all, this is also the anchor that makes the gun compatible with many of the above attachments. One company is taking this to another level, by having the rail system have an integrated electrical supply to power all the accessories that are attached to the rail.