Aiding and abetting is a charge used when a person is accused of helping another person commit a crime in some way. Usually, the person charged with this will not have been at the scene of the criminal act when it took place. Instead, it will be a person who had knowledge that the crime was going to take place beforehand or someone who finds out about it and helps conceal it.
Here's a good example of aiding and abetting. If a woman knows that her friend wants to rob the store where she works, she may "accidentally" forget to lock the cash register or leave the back door open. She won't be there at the time of the robbery, and it will look as if she simply made a mistake. However, if it's discovered that she is linked to the person who stole from the store, she could be charged as an accessory.
The prosecution has to prove that a crime was committed and that the accused party somehow helped commit the crime if it wants to show aiding and abetting took place. Likewise, to charge a person with accessory after the fact, the prosecution has to show that the accused person was aware a crime took place and that he or she helped the person who committed it cover up that criminal act in some way.
In any situation where you're accused of being an accessory or aiding and abetting in a crime, it's a good idea to work with someone who can defend you. This could lead to penalties such as jail time or fines if you're convicted.
Source: FindLaw, "Aiding and Abetting/Accessory," accessed June 14, 2018