The GCSE answer is.
An ionic compound is one in which the bonding between the atoms is ionic, for example sodium chloride is an ionic compound. It is formed from sodium cations and chloride anions.
There are substances which can be regarded as being ionic which are not normally viewed as salts. For example some metal oxides such as potassium oxide are problerly best described as being ionic solids but in this case the compound is formed from oxygen and potassium.
A salt is the product of reacting an acid and a base together. Many salts are ionic. For example if you were to react hydrochloric acid with zinc and then to dehydrate the product (avoiding hydrolyisis) you would end up with zinc chloride.
The PhD chemists view of the matter
One great problem in chemistry is that there are very few perfectly ionic compounds. I hold the view that the more chemistry you know the more one becomes aware of the fact that simple explanations do not work well.
The great problem in my mind is that a great spectrum of bonds exist from perfectly ionic to simple unpolarised covalent bonds. All cations have some ability to pull electron density towards themselves. A simple anion such as a chloride should in the idea world be a sphere of electorn density.
The electrostatic attraction of the electron density by a cation on an anion pulls electron density towards the cation. This can be reagrded as leading to some covalent character of the bond existing. Thus as a result I hold the view that there are very few true perfectly ionic compounds.
One example would be tetraphenylphosphonium tetraphenylboarate which has two very large ions, the interaction between these ions is close to a perfect ionic attraction. Here is a diagram of the tetraphenyl phosphonium cation.
We can see here that the ion has the positive charge deeply buried inside it, here is the solvent accessable surface, I have rendered it in colours to represent the charges at points on the solvent accessable surface.
The atom locations can be seen in the following picture to help you understand what is happening.
Even the tetramethyl phosphonium cation is able to isolate the positive charge away from the solvent accessable surface, in contrast the trimethyl sulfonium cation (Me3S+) presents to the outside world (the solvent accessable surface) part of the ion which is quite positve.
We can also take a molecular orbitial view of bonding, a lot of coordination chemistry of transition metals is considered with the ligand field model. The ligand field model is based on the crystal field model which treats all bonding as ionic. However the same results can be obtained for d block metals using molecular orbitial theroy.
It is also interesting to note for the lanthanides that they do not have strong ligand field splitting effects, this is due to the fact that their f orbitials are close to the centre of the atom and do not interact well with ligands. In many compounds often the bonding of lanthanides is viewed as being ionic.
If we consider for a moment palladium chloride then it is clear that the attraction of the chlorides to the palladium cations results in the formation of covalent bonds. If we move back from palladium to a metal which is less able to form bonds to chloride (cobalt).
Then if we have anhydrous cobalt chloride, we have in the anhydrous solid a Co-Cl distance of 2.453 Å. If we dissolve cobalt chloride in water then the water molecules will react with the cobalt(II) centres to form hexaaqua complexes of cobalt [Co(H2O)6]2+ which have a larger radius than cobalt(II) cations. These are less able to electrostatically attract chloride anions and the bonding of the chloride anions to the [Co(H2O)6]2+ cations will become closer to being a simple electrostatic (ionic) attraction / bonding than the bonding between the chlorides and the cobalt in the anhydrous cobalt chloride.
Here is a picture of the crystal strucuture of anhydrous cobalt chloride. (H. Grime and J.A. Santos, Zeitschrift Fur Kristallographie, 1934, 88, 136-141) You can see how the cobalt has a octahedral coordination environment in which six chloride anions form bonds to the cobalt. Keep in mind that the chloride anion is a ligand with a weaker ligand field than water. As a result the cobalt adsorbs red light in the form of anhydrous cobalt chloride.
By the way the solid is a layered solid, the solid can be thought of as being like a series of slices of bread (chlorines) with the cobalt as the jam.
By the way the distance between cobalt and chloride in the [CoCl4]2- complex is 2.276 Å, which is a bit shorter than the distance in the anhydrous solid.