Your horn mustn’t be used between 11.30 pm and 7 am in a built-up area or when you’re stationary, unless a moving vehicle poses a danger. Its function is to alert other road users to your presence.
You may also be interested in these theory test questions