If its an e-ticket, the system will automatically cancel it. And if you board the train without buying another ticket, you will be treated as travelling without ticket and penalized accordingly.
.
If its an i-ticket or paper ticket, ideally you should be travelling in unreserved coach. But if there is a berth vacant in other classes, you may travel on that get allotment.