Upvote:4
You will need to go through UK immigration to change airports. I am assuming you are an Indian citizen and don't have a European residence permit. In that case, you will need a visa. Merely holding a short-stay visa (which is required to enter Spain) is not enough to qualify for visa-free transit.
You won't be able to get this visa on arrival (in fact, you should be denied boarding by the airline in Mumbai and wouldn't even reach UK immigration).