There are lots of them. Will you be studying?
In each University there's at least one. There are also some private clubs. I don't know any.
I usually go hiking on my own with friends.
There are also companies that organize trekings, raftings and so on, with very reasonable prices.
If you want to have a look,
http://www.arawakviajes.com/ this is one of them. I went once with them. I didn't like as much as going on my own but it was OK. Also the council organize things in the Juntas Municipales.
You will enjoy Spain a lot, La Pedriza is a incredible place for climbing rocks only 35 minutes away from Madrid although it's a little bit overcrowded, it's nice for hiking also.
Apart of the central system you can be in Gredos in 2 hours, Picos de Europa in 4 hours, and the same for Guara (Huesca), where you can find the most beautiful canyons of Spain.
I enjoy very much trekking and also descending canyons although I don't like to feel fear.