From the airport to the University
A taxi from the airport to the Madrid Autonoma University which will cost you around 30 €
From Barajas airport, follow the signs "Metro" to the subway station. Line 8 takes you directly to Nuevos Ministerios quite efficiently (about 15 minutes). There you can pick up a train (Line C-1 to Alcobendas/San Sebastián de los Reyes, Line C-7 to Colmenar Viejo and Line C-10 to Tres Cantos) that takes you from that station to the University (Cantoblanco-Universidad Station). These are the map of the metro and the map of the train (click on "plano" to see it).
From Madrid to the University
Probably the best way. There is a train station at the University. You can take one of these tree lines: Line C-1 to Alcobendas/San Sebastián de los Reyes, Line C-7 to Colmenar Viejo and Line C-10 to Tres Cantos All of them stop in Atocha (main station in the Centre/South of Madrid), Recoletos (Plaza de Colón, Paseo de la Castellana), Nuevos Ministerios (Paseo de la Castellana) and Chamartín (main station in the North). After Chamartín, the second stop is Cantoblanco-Universidad, where you should exit. You can check online the time table.
Bus line 714 goes from Plaza de Castilla, to UAM, in about 15 minutes (depends on the traffic). Its frequency is about 20 minutes.
From the train station to the Science Faculty
Check this plan
For accommodation, booking.com is a good start point. Hotels near Atocha, Plaza de Colón, Nuevos Ministerios or Chamartín should be within 5-10 minutes walk to the train station. Nuevos Ministerios has direct Metro connection with the airport.