Assuming your employer wants you to work your 3 months notice rather than just paying you in lieu of notice, your first step if you find a new job that starts during your notice period is to ask your employer if they will release you early. Most would be happy to do so, as obviously they will save money.
If your employer refuses to release you earlier than the full 3 months, you can write formally to them stating when you would like to finish. This is called 'counter notice'.
If your employer won't give you permission to leave early you do run the risk of losing redundancy pay. But most would let you go early so don't assume the worst until the situation arises and you've asked them.