If somebody gets refused entry to the UK, they check YES on question 7.6 and put VISITOR for question 7.11 and then locate the refusal stamp in their passport. Underneath will be a hand-written number. It is the reference number to put in 7.12.
In 7.13, list the IS86 or IS98 (whichever they gave), the port, the date, and say "refused entry".