Legal status of drugs
Heroin is a Class A drug. This means that possessing it can lead to a prison sentence of up to 7 years and an unlimited fine. Supplying (which includes giving it to a friend) could lead to a life sentence and another unlimited fine.
Cocaine and crack are Class A drugs - illegal to have, give away or sell. Possession can get you up to seven years in jail. Supplying someone else with it can get you life and an unlimited fine.
Cannabis is a Class C substance. It's illegal to own it and it's illegal to supply it. It's also an offence to grow cannabis. Possession can get you up to 2 years in prison and an unlimited fine, although most people are either cautioned or fined. Serious offences of supplying cannabis can get you up to 14 years in prison and an unlimited fine.
Ecstasy is a Class A drug - illegal to have, give away or sell. Possession can get you up to seven years in jail. Supplying someone else with it can get you life and an unlimited fine.