First, try to consult with your school. They will tell you the steps to change the name. It will definitely be a problem in the further steps of the exam or form. You should change it as soon as possible.
You should also write the name of the exam or which form you have written the wrong name, because from your question it is not understandable. So, I will take it as general change of name.
If it is related to CBSE, you can email them regarding the same. They will provide you a link where you will able to change the name. Generally, they will ask for your Aadhar card or 10th marksheet for name change. Also, there are chances that they will tell you to post all the necessary certificates to the department.
Thanks & have a nice day.
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile