The letters are/ were abbreviations for the type of package:
SOIC=Small Outline IC
SOT=Small Outline Transistor
TO=Transistor Outline
DO=Diode Outline
TSSOP=Thin Shrink Small Outline Package
PLCC=Plastic Chip Carrier
DIP=Dual In-line Package
etc.
The numbers were assigned to differentiate the different packages in the past. Today they sometimes refer to pin numbers, or even combinations. SOIC-14 means it has 14 pins.
Note that today the old names do not necessarily relate to the old meanings.
For instance SOT-23 is a 3-pin Small Outline Transistor package, surface mount.
But today you can find IC's in this package, so the name has been extended to, for example: SOT-23-5, SOT-23-6, or SOT-23-8. These are packages that are just as small as the original one, but have 5, 6 or 8 pins. And they no longer house transistors, but the name still spells SOT. A matter of tradition...