There are several ways to get to Hamburg from Madrid, including by plane, train, and bus. Here are a few options:
By plane: The fastest way to get to Hamburg from Madrid is by taking a flight from Madrid Barajas Airport to Hamburg Airport. Several airlines offer flights between the two cities, and the flight time is around 2 hours and 30 minutes.
By train: The fastest way to travel by train from Madrid to Hamburg is to take the AVE high-speed train to Paris and then transfer to a Thalys train to Hamburg. The entire trip takes around 16 hours.
By bus: Several bus companies operate routes between Madrid and Hamburg, and the trip takes around 40 hours. Buses depart from the Estación de Autobuses de Avenida de América in Madrid.
By car: You can also drive to Hamburg from Madrid, although the trip is quite long and takes around 25 hours via the A-2, A-7, and A-1 highways.
It's worth noting that Hamburg is located in Germany, so if you're coming from Madrid, you'll be crossing international borders. You'll need to bring your passport and be prepared to go through customs.