An accessory, in legal terms, refers to a person who in any way helps with the carrying out of a crime. An accessory to a crime is usually not the person who commits the crime, but rather is a person that makes committing the crime easier for the person who is actually committing the crime.
In general, a person who is convicted for being an accessory to a crime will not be punished quite as severely as the person who actually commits this crime. However, this is not always the case. Depending on the crime, an accessory to a crime can be just found to be just as culpable for a crime as the person who commits the crime. For example, an accessory could be found to be as culpable for a charge of murder if the accessory hides the dead body or supplies the weapon to the murderer, knowing that the murderer is planning on killing somebody.