The best way to fix it is likely to depend on the type of door. and how the cat flap was originally fitted. I guess you would need to build some sort of timber frame and then attach sheet material to this so that it is flush with the surrounding door. Then fill the gaps and paint.
Hi, agree with pauanui's answer and would like to add that when you attach it to the door make sure that all the screws you use to hold it in place are on the inside of the door so that it cannot be removed from the outside. You would be suprised at how many people have put them on the outside.