What are the definitions of each and what exactly is the difference?
In English and Welsh law, they mean the same thing.
Those who help others commit crimes have been known by a number of different legal terms: accessories, secondary parties, or accomplices.2 These terms all mean the same thing.
2 At one point the common law distinguished between principals in the second degree (those who were assisting the principal and were present when the offence was committed) and accessories before the fact (those whose participation was limited to activities before the crime was committed). The law no longer draws this distinction.
Jonathan Herring, Criminal Law: Text, Cases, and Materials (2020 9 ed). 837.
The simplest way of drawing this distinction is to say that a principal is a person whose acts fall within the legal definition of the crime, whereas an accomplice (sometimes called an ‘accessory’ or ‘secondary party’) is anyone who aids, abets, counsels, or procures a principal.10
10 Gnango  UKSC 59, para 129 (Lord Kerr).
Ashworth's Principles of Criminal Law (2020 9 ed). p 455.