If travelling from a Green list country, you need to take a single Day 2 test on or before Day 2 of your arrival to the UK.
For arrivals from Amber list countries, you are required to take a mandatory Day 2 test on Day 2 of your arrival to the UK and also a mandatory test on Day 8 of your arrival to the UK. There is also the option of taking an early Test to Release PCR test on Day 5 of your arrival to the UK in order to end quarantine early if you receive a negative result. You are still required to take the Day 8 test regardless of whether you have taken a Test to Release.