If you have a airport nereby were you live you can look at a transfer airport like Amsterdam, London,Frankfurt, Brussels, maybe even Madrid.
From those aiports are several flights a day 7 days in a week so than you can see what fits your schedule best.
In Barcelona you can take the hop on hop off bus they have the bleu and red circle ,one will have stops at the Sagrada Familia, Parc de Guell, Casa Milo ect.all Gaudi related, the other one has the Barcelona soccerstadium Camp Now in there cirlce.
As for the ports there are tons of things to see and do, depenting on the time you have In Malaga you can go to the Alhambra or if you are more in the celebrity mood go to Marbella habour called Puerto de Banus. This is one of the jetset spots in Europe. Or visit the Picasso museum.
Palma de Mallorca you can visit the Cathedral and the city is very easy and nice to walk around.
Hope this helped at little enjoy your trip and stay safe.
Groetjes(Dutch for Greetz).