The basic answer is that all 4 byte variables must line up on boundaries divisible by 4, 2 byte variables must line up on boundaries divisible by 2, and 1 byte boundaries must line up on boundaries divisible by 1 (not ever a problem).
For example, storing a struct with bytes that go
1 4 1 2 vs. 4 2 1 1.
The first one takes 1 + 3 padding + 4 + 1 + 1 padding + 2 = 12 bytes (4 bytes of padding).
The second way takes 4 + 2 + 1 + 1 = 8 bytes (no padding)
There are similar threads with similar examples, but I didn't see any from the last week. You would have to dig past page 5 in this forum to find such a post. I think search only searches the archives.