If you are submitting a paper return, it must reach HMRC by midnight on the 31st October. If you decide to send your tax return online, it isn't sure until midnight on the 31st January.
You will be charged a penalty if your Tax return isn't received on time. When you send HMRC a Self-Assessment tax return, you will receive a Self-Assessment statement showing what tax you owe and how to pay. If you have paid too much it will show how much you will be repaid. If you file your Tax Return online, you can view this before you even receive it in the post.