Most people speak English very well, so it's not necessary to speak Spanish, but I highly recommend learning some before you go. I don't mean the bare basics, but enough to get around Madrid and to make yourself understood.
It's not necessary, however, to be a perfect linguist, because if you attempt the locals will respect you...

