I think it is best to book it on internet or even book it when you book the flights.
There are pick up points at Malaga and Granada airports and all companies have a pickup and drop off point in Granada itself.
Here is a list of hire car companies that have offices in Malaga and Granada.
The prices vary enormously according to the date so it is best to have a look at the websites.
By the way this page tells you where to park in Granada.
http://granadaforo.com/getting-around-in-granada/where-can-i-park-in-granada/Car hire websiteshttp://www.carjet.com/http://www.amigoautos.com/http://www.atesa.eshttp://www.avis.eshttp://www.europcar.eshttp://www.crowncarhire.com http://www.alquiauto.es/https://www.hertz.comThis site will tell you the distances between Spanish cities.
http://crazycalculations.com/distances/This link will show you the distance to Granada from other Spanish cities with driving instructions.
http://crazycalculations.com/distances/granada_other_cities.php