If you have already submitted your visa documents which haven't been processed yet, firstly you must inform your university as soon as possible. Discuss if you can send UKVI a message detailing the error. Different universities have different way of dealing with this, so check with your International Students support service. For example, Sheffield University suggests:
What if I made a mistake on my form?
... If you have completed the form and paid and therefore submitted the form online, you will have to write a covering letter to explain what mistake you have made and send this letter together with your supporting documents. If you have already submitted your supporting documents, then you can write a letter explaining the mistake you made and send the letter to this address using the details below:
PO Box 179,
BOOTLE,
L80 4WF
So if the mistake is minor (e.g. everything in your application is correct but you ticked the wrong box in one section), you might be able to write a brief but formal cover letter to the consulate where you submitted your documents. You should include in the letter your
- application number
- application date
- your name
- date of birth
- passport number
- nationality
If the mistake is likely to be significant (e.g. you ticked the wrong box, then omitted all the subsequent travel details), it would be better to withdraw your application and apply again. A withdrawn application won't affect future applications, whereas a refusal will be logged on your UKVI records and may complicate future applications.
See also Gayot Fow's answer.