Oh, misread the original query...
On Rome-Milan, it depends whether you want to go direct from city to city, or whether you want to stop on the way. To go direct, as mentioned above, there are two competing companies:
FS/Trenitalia (the national operator) and
Italo. The former operates to a more central station in Rome, but the latter can have better prices and newer trains. Both operate high-speed trains on an airline-style ticket basis (but with a shorter maximum booking time) so if you want cheap tickets, you need to book in advance, and expect no flexibility to change your ticket.
If you want to stop en route, there are interesting stops on the high-speed route (including Florence as mentioned above, and also Bologna), but you can also take the much slower (and occasionally slightly worse for wear) Regionale trains, which have cheap walk-up tickets, and would let you visit other places on the way. Schedules are on the Trenitalia site as above (you need to select a different tab - it assumes you want 'le frecce' - 'the arrows' or high-speed services by default).
From Vienna to Germany, you can book either with
OEBB (the Austrian national operator) or
Deutsche Bahn (the German national operator). The best way to book depends on exactly where in Germany you're going. The best fares are normally the "SparScheine Deutschland" - details are
here.
In all these cases, it's pretty simple - you buy online, get a print-at-home ticket (usually valid with ID) and just turn up at the station and board, with your luggage. You're unlikely to go through immigration checks between Austria and Germany.