If you buy a phone in a one to one purchase (Gumtree, going to house etc) and they don't pay their bill, or report it lost/stolen to the network then it's going to get blocked.
If they have reported it missing and you contact the network and can show that you bought it from the person who is claiming to have lost it, then they'll look at it a bit more closely, but if they haven't paid the bill then you're stuffed.
Changing IMEI numbers is illegal, has been for a few years now, and doing it, even if it could be done, a lot of phones can't be, will find you with room and board for up to five years.
eBay has one redeeming feature in that if you pay with PayPal and it gets blocked you can file a claim within 90days and get your money back.
The phone itself is YOURS, you can do with it as you wish (apart from change numbers and working on the basis it's not stolen), but the network owns the IMEI number (a bit like DVLA, you can buy a personal Reg number for thousands, but if you change it or mess around with it DVLA can take it off you with no recompense).
If it does get blocked, at this time, it is only blocked in the UK, so selling it elsewhere in the world (which has its own risks) or breaking it down for parts (screens can be VERY expensive) are pretty much your only options, unless you just want to use a phones other features and not make calls.
Hope this helps you.