It's a little more complicated than that. This answer assumes that you are not resident in Russia (where the situation is a little different)
The original Lock On is, I believe by the same team, but published by UbiSoft.
Since then, the same team (the Eagle Dynamics team here) have created two addons entitled Flaming Cliffs. The most recent, so far, is Flaming Cliffs 2, which is compatible online with Black Shark, but not Black Shark 2 or A-10.
I believe a Flaming Cliffs 3 is being developed, but is not available yet. This should hopefully be compatible with A-10, BS2, P-51 and any other aircraft in DCS: World. You will need the original Lock On to play any Flaming Cliffs module, but you will not need the previous Flaming Cliffs games.