Excerpted from Section 2 of Nuclear Weapons Frequently Asked Qustions by Carey Sublette.
Assembling a critical mass by firing one piece of fissionable material at another is an obvious idea and was the first approach developed for designing atomic bombs. But it is probably not obvious how you take two subcritical masses and obtain the equivalent of three critical masses by bringing them together.
This can be made clear by conducting a thought-experiment. Imagine a spherical pit made up of about three critical masses of fissionable material. Now remove a core (like an apple core) from the pit with a mass slightly less than critical. Since the center of the pit is now hollow, its effective density has been reduced to 2/3 of the original density. Since we now have two critical masses remaining in the pit, and the reduction in density leads to a further reduction of (2/3)^2 = 4/9, the pit now contains only 2*(4/9) = 8/9 of a critical mass.
The two sub-critical pieces can be brought together by firing the cylindrical core down a gun barrel into the center of the hollowed-out pit. The insertion time is large - over 1 millisecond. This is the design used in Little Boy, the bomb dropped on Hiroshima (except that a slightly less efficient squat cylinder was used, rather than a spherical pit).
The primary advantage of gun assembly is simplicity. It is as close to a fool-proof design as ordinance technology allows.
The drawbacks are:
a. the lack of compression, which requires large amounts of
fissionable material, and leads to low efficiency;
b. only uranium-235 (and possibly U-233) can be used due to the slow
insertion speed;
c. the weight and length of the gun barrel makes the weapon heavy and
fairly long.