The left image is close packed Face Centered Cubic lattice.
The right picture shows hexagonal close packed lattice
(Mg, a-Co, a-Be).
Close packed lattices are formed by close packed planes (A is the blue and
B is the gray ones below). You can put the third plane in two different ways -
ABAB or ABCABC. C is formed by the red spheres
(the third plane's spheres are reduced two times for convenience)
FCC and hexagonal lattices are very similar except for FCC includes a close
packed plane of the third type (C plane - red balls). The C plane
is shifted relative to the first A plane in FCC lattice.