The legal definition of crime is a set body who decides on what crime is, which is commonly called the legal system.
Actus and Mens rea- the UK law comprises of an actus reus(guilty act) and a mens rea(guilty mind). An example, is intending(mens rea) to shoot someone, taking deliberate actions, then actually shooting(actus reus) that person.
Strict liability offenses- a person can be found guilty of a strict liability offense even if they had no intention to commit a crime and were unaware f the illegal nature. For example, selling alcohol to individuals below the legal drinking age is a strict liability offense.
Changes over time- the full legal code is not fixed, new laws get added over time and old laws are changed. For example, homosexuality was illegal but then became legal over time
Changes over culture- different countries will have different legal codes. For example, all drugs are illegal in Portugal but in other countries drugs like weed are legal.