In the case of NaCl, it is a fcc array of anions with the cations inside the octahedral holes. It can also be viewed as fcc array of cations with an anion in each octahedral hole, they both produce the same pattern.
But the easiest way to remember it is to note that each A is surrounded by an octahedral of X, and each X is surrounded by an octahedral of A.
This structure is also adopted by NaF: a white solid used to add flouride ions to water:
You can see that when the rock-salt structure has both components A and X similar in size, it starts to look primitive cubic. But this terminology is used for a repeating component, not for a mixture of atoms. So it would be incorrect to say "sodium flouride has a primite cubic structure". It would be correct to say "sodium flouride has a face-centered cubic structure of flouride ions, with sodium ions inside the octahedral interstitial holes", even when the sodium ions are obviously too big to actually fit into the holes.
Calcium carbide also has a rock-salt structure, this time elongated parallel to the c22- ion:
Calcium carbide is a white powder used to produce acetylene by adding water:
CaC2 + 2H2O → C2H2 + Ca(OH)2
Dripping water on it and igniting the acetylene makes a carbide lamp, used in headlights, stagelights (coining the phrase "in the limelight") and lighthouses: