Upvote:2
If your friend needs a visa (why else would he apply), and the visa was denied, then:
He won't be allowed to board the airline.* see the paragraph below
Even if he manages to board the airline, he most certainly will not be allowed into the country. Most probably arrested for illegal immigration and deported post haste.
If he manages to enter into the UK illegally, if caught - he will be prosecuted, possibly banned, and definitely deported.
If he manages to enter into the UK illegally, and tries to leave on his own accord - he will most likely be banned from further entry into the UK.
The only possible reason I can see for your friend applying for a visa, and then trying to enter the country anyway is if previously he was eligible for visa-free entry, but somehow this privilege has been revoked (possibly for violating the terms of the visa-free entry - for example, by overstaying or working). If this is the case, your friend will most likely be allowed to board the aircraft, but the immigration officers will deny him entry; and then we are back to detainment and deportation.
@Henning's comment reminded me of one more possibility:
It could be that your friend needs a visa for the purpose of the visit, even though he doesn't need one normally. For example, to work in the UK even those with visa exempt status need to obtain a visa (with some exceptions, for example EU nationals).
Thus he can attempt to enter the UK, but if questioned at the border and then caught for deception (for example, your friend was entering under visa exemption, but they found documents relating to job offers in the UK) your friend may be subject to refusal and/or removal.
The bottom line is - it is not a risk worth taking.