If you are free, Malaga has handsome cab rides that are inexpensive and will give you a nice 1/2 hour tour of the area. Also, you can walk in the downtown area; lots of shops and some cafes. The beaches are nice, it depends where you are coming from, but they seem pretty close to town center. I'd take a taxi, but 4 hours isn't much time and how will you get back from the beach to airport? Any way you do it, Malaga is a nice spot to be stuck. Have fun.