What is the easiest way to get from the Madrid airport to Salamanca?
The answer to "easiest" is nearly always "have a pre-arranged private car service waiting for you when you get through immigration", but that's not affordable for most of us.
In this particular case, the next-easiest option--depending on your schedule--might be the express Avanza bus that picks up at Terminal 1 and Terminal 4. The schedule is rather frequent but varies by day of the week. Sorry that the link is in Spanish. When I try to change it to English, it either doesn't work at all or gives me a schedule for Avila.
Although it would be a good idea to buy that bus ticket in advance (express buses sometimes sell out), it's hard to be sure exactly when you'll walk out of the train station and what departure you can catch.
You could also take the train from Terminal 4 to Chamartin Station in Madrid and change there for the Media Distancia train to Salamanca. The running time is considerably longer than for the bus, and the Madrid-Salamanca train isn't terribly frequent.
In your shoes I'd take all the schedule info with me and try to get the bus. If I just missed one, I'd hop on the train to Chamartin.
Unless I'm misinterpreting the online info, there's not much difference between the train and bus fares.