As already mentioned in the brief description, Madrid offers planty of things to do either from a cultural point of view or for nightlife.
What I did not add and could be helpful is how can you celebrate the new year in Madrid. You can have a nice dinner with typical music, dance, and drink, but this is what you can also do at home. Or, and this is what my friend and I did, simply wait for the new year in the main square, Plaza del Sol, together with thousands of other people from Madrid or other countries, eating together the grapes (one for each month, one every seconds that the the the clock strikes).