This happened to mine (came from France). It has to be de-registered from the foreign country first, is grounded (in the UK) while that is going on, and is then re-registered with the CAA. The CAA have to inspect it to issue the CofA.
I don't know a lot more because I didn't do the paperwork personally but do be very careful especially if it is secondhand.