If they are multi-coloured and hairy they are probably the processional pine caterpillar who were looking for a warm spot to pupate and didn't know where they were going. It only needs one to lead the way and the rest will follow. Don't touch them, the hairs are slightly poisonous and very irritating.
This is only a guess but another possibility is that they have been sprayed or have eaten a substance left out for them by the authorities, that causes them to seek water. They are a real threat to the pine trees and the Spanish council/govt would be happy that there are a few less.