Although it may seem like the letters and numbers assigned to aircraft are completely arbitrary, there is actually a fine-tuned system behind the naming. Airbus, for example, has a pretty rigid code by which they name their planes.
The very first Airbus ever made was the A300. In this case, the “A” stood for Airbus and 300 was the original capacity. After some time, Airbus realized that the plane would be better with only 260 passengers (instead of 300). However, rather than rename the plane the A260, they decided to go with A300B.
After that, Airbus decided to continue with their system and started naming their planes by multiples of 10 — A310, A320, A330, A340, A350 and A380. (The company decided to skip A360 and A370 in case they ever wanted to go back and create planes that are somewhere in between the A350 and the A380 in terms of size.)
When Airbus decides to tweak a plane just a bit, they will stick to numbers close by. For example, the shorter variants of the A320, A318, and A319.
But these four letters and numbers are only part of the aircraft’s name. A full, proper Airbus name would be, for example, the Airbus A320-231. This plane belongs to the A320 family, and the last three digits specify the plane even more.
The first digit means that it was part of the Airbus A320-200 series — the second version of this plane. The last digits correspond to the type of engine used. (A full list of engine codes is available here.)
For those who are curious: Boeing’s system of naming airplanes is a bit more complicated. The numbering process is laid out here.