If you have a connection at the Madrid Barajas Airport and you need to get from one terminal to the other, it can take time, but it is free and relatively easy. You can walk between terminals 1, 2, and 3. It is about a 10-minute walk between Terminal 1 and Terminal 2 and 3 which are right next to each other.