This app was mentioned in 7 comments, with an average of 3.00 upvotes
First thing,
If you have a android phone, Install this app https://play.google.com/store/apps/details?id=com.greenlionsoft.free.madrid
Now lets use a Metro map as a refernce
You need to get from Aeropuerto T4 or T1 to Opera
First of all, The airport stops have a 3 euro surcharge and the 1 use ticket costs 2 euros (actually, 1,5€ and then 10 cents more per station, but since you´re doing more then 5 stations, its capped at 2€)
So make sure you either have 5-6 euros in coins or a 5 euro bill on you since it might not accept a credit card for such a low ammount, another option is to directly pay the 12,20€ 10 use ticket (you will still need to pay the 3 euro airport surcharge)
Now as /u/jcfdez indicated,
You can take, Line 8 (pink) in nuevos ministerios direction to nuevos ministerios (end of line), Then change to the Dark blue (careful, theres 2 blue lines, 10 is dark blue and 1 is light blue) line 10 and take the train in the direction of Puerta del Sur.
Now you have two options, Change trains in Alonso Martinez to the green line casa de campo direction. or change trains in Principe Pio to the Ramal interconnection train, the number of stops is almost the same (i think theres 1 or 2 stops difference)
the difference is what are you carrying with you, if you´re carrying bags or something heavy, the distance between the trains in Alonso martines could be annoying since line 10 is quite deeper and requires you to go up to the base floor of the staton and then go down again to the green line. While the Principe Pio Ramal is just get off the 10 line, go up 1 set of stairs and you´re there.
Im just mentioning that becuase principe pio is an easier station to navigate, especialy when you have bags with you, and the ramal is just 1 station away from opera, actually its a interconnection train that farries people from principie pio to opera.
I only use Metro | Bus | Cercanias
It includes together the metropolitan buses, subway, urban trains, buses connecting Madrid with the surrounding towns (the green ones) and a map of the Madrid bicycle service signaling which stops have a high or a low amount of bikes ready to use.
That's five apps in one. And nope, I don't even know the guy behind this.
That's a great metro, line 3 puts you in the center in less than 30 minutes. You also have access to the cercanías that puts you in Atocha in under 15 minutes (if you time it right).
Use this app to know the real times of buses and cercanías. Doesn't work for metro though.
My personal favourite: an app that puts together all transport systems in the region so you don't need 472883727 apps when planning your trip: https://play.google.com/store/apps/details?id=com.greenlionsoft.free.madrid
a note about buses,
the blue (inner city) buses have a number on the stops, so you can see how long until the next bus comes, It becomes somewhat unreliable during the late hours (after 10pm, buses usualy run from 6am to 11pm but some run untul 22:30 and some until 23:45)
This app https://play.google.com/store/apps/details?id=com.greenlionsoft.free.madrid for android will allow you to check waiting times for buses and will also use the GPS to tell you where are the nearest metro stations.
But if you plan on taking green buses (which connect the city with the suburbs) you might want to use this one instead https://play.google.com/store/apps/details?id=com.crtm.mitransporte
Within Madrid the Metro Bus Cercanías app is great for local transport
Also, this one: https://play.google.com/store/apps/details?id=com.greenlionsoft.free.madrid It's ugly but the information is good