You need to book a lateral flow test from an “approved supplier”, you cannot use a standard NHS one.
You then take this test kit with you, perform the test within 72 hours of arrival, and then upload the result to the providers website. You are then sent a negative certificate, and this is thoroughly checked at the overseas check in desk along with proof you have completed the UK Government pax locator form.