And that’s when you create a performance improvement plan.
If someone is underperforming then you take steps to try to understand why and help them to get to the level the company needs them to be at. Hopefully this works and everyone is happy but you need to be clear (to your employee and yourself) that ultimately this could end up in dismissal if it doesn’t work out.
This is when you document everything and have regular meetings with the individual so everyone understands what is going on and if it ever becomes legal then you have everything you need to justify your decision.
Point is, you only need to do this if someone is underperforming so much that you’re thinking you need to dismiss them, and if someone’s performance is bad then you don’t wait for the annual (or quarterly or whatever) review before doing something about it - you deal with it straight away