The easiest places to go hiking from Madrid are Cercedilla, Cotos or Navacerrada, you have a train each hour, to go to Cotos or Navacerrada you have to change the train in Cercedilla, and to hike in Cercedilla you have 20' from the train station before you leave the road. If you're going in winter you have to be carefull with the snow or the weather.
If you prefer to go with a group, check here also
http://www.arawakviajes.com/home/home.htm , prices are not expensive, they take you in a private bus with one guide or two depending on how big is the group, normally from 20 to 40 people, you can choose between different difficulties, or harder routes....