You should absolutely buy your ticket to the Prado in advance. The tickets are timed-entry but are good for the entire day so if you want a long visit, go in the morning. Print the tickets if you can so you don't have to worry about lack of wifi or a dead battery.
With your ticket in hand, you can go directly to the museum's Velazquez entrance (the central entrance in the middle of the museum's grand facade) and you're in.