Airports near Ulm
There are several airports around Ulm.
The closest one is Memmingen or Munich West as Ryanair calls it. The airport is very small and is mainly served by Ryanair. The onwards connection to Ulm are not ideal. You can use the Allgäu-Airport-Express, which offers schedules trips to Ulm 2-3 times a day for EUR 14 (EUR 12 online) per person or EUR 28 (EUR 24 online) per family, o you can book them for a convenient time for EUR 85 per person. The new timetable is now available online. The bus will wait for until all passengers of Ryanair flights are checked out. Alternatively, you can take a taxi to Memmingen train station (4km from the airport) from where you can get a train to Ulm.
Munich airport is another alternative. To get from the airport to Ulm, you have to use first the subway and then a normal train. The fasted connection is not necessarily from the main train station (Hauptbahnhof in German or short Hbf); Munich East train station or Munich-Parsing can also be used as interchange. The whole trip to Ulm takes a bit more than two hours. You can find tickets and connection for both subway and train from Deutsche Bahn. Normal tickets with fast trains cost around EUR 80, but if you book early, you can get better deals. With the cheaper tickets, however, you are often bound to a particular train, which might be dangerous when your flight is delayed. Thus, I often book two single journeys: a normal price one (flexible ticket) for the journey from the airport and a saver/cheap ticket for the journey to the airport. If you don't mind slow trains, you can also book a Bavaria Ticket (Ulm is just on the border of Bavaria), it is valid for one day (no fast trains like ICE though) and costs EUR 21 for one or EUR 29 for up to five people. The overall journey will then take nearly three hours. To book the Bavaria ticket, you can look for a convenient connection for a single journey and additionally check the "Local transport" checkbox on the Deutsche Bahn website. You can also take earlier or later trains on the booked day, but you are bound to use regional/local transport trains.
Thirdly, there is Stuttgart airport. Again you have to use subway or bus to get to a train station. In general, Stuttgart is a bit closer and the overall journey takes about 1 hour 45 minutes.
Finally, you can go to Frankfurt airport, which is Germany's biggest airport. Although Frankfurt is further away, it is convenient in that the train station is directly at the airport. Deutsche Bahn calls the stop "Frankfurt(M) Flughafen Fernbf". The (M) is for river Main as there is another Frankfurt in Germany at the river Oder. Flughafen is airport and Fernbf abbreviates Fernbahnhof, which means long distance train station. Every two hours there are direct trains to Ulm, which take about 2 hours 15 min. There are also indirect connections, which can take a bit longer.