Here is some more info:
It is useful to think about the problem of "spherical codes" (a set of points in S^n with minimum distance $\alpha$). Understanding densest Euclidean packing amounts to understanding spherical codes when $\alpha$ tends to zero. You can ask about codes in other symmetric spaces. An example worth mentioning is binary codes with prescribed numbers of '1's and '0's.
Random (or greedy) constructions give the best known asymptotic constructions for spherical codes (and sphere packing) and for binary codes. (For sphere packings these are the Minkowski-HlawkaMinkowski-Hlawka lower bounds for error correcting codes these are the Gilbert-Varshamov lower bounds.) It is a fundamental open problem if these random constructions give the best rate of error correcting binary codes and of spherical codes.
A major difference between codes and sphere packings is that for codes over a large alphabet there are better constructions than the Gilbert-Varshamov codes based on algebraic geometry (Goppa codes). For these constructions, no analogs for spherical codes are known. (Sometimes people raise doubts if the Hamming distance is appropriate for large alphabet codes.)
Several basic techniques for proving upper bounds are common to all these types of codes. Those include the volume bound, the Elias bound, Delsates' LP method and a recent extension by Schrijver based on semidefinite programming.
The class of lattice packing is analogous to the class of linear codes.
There are various differences (in addition to item 3). For example, the best known kissing number (or [expected] occurrence of minimal distance from a codeword) for binary codes can be exponential in the dimension while for sphere packing only quasi-polynomial kissing numbers are known. The question if there is a sphere packing with exponential kissing number is very interesting. See this answer from the MO question a-round-lattice-with-low-kissing-number.