From the ferry terminal, you need to take buses to go to the center of Rostock. You can also head for the Rostock-North S-Bahn (train) station, about 1km away from the terminal. Note that you may get stuck at the ferry port on holidays when bus services are infrequent if you can’t find the train station. A taxi ride downtown will cost you around 20€.
From Leipzig and Berlin Central Station you can take the „normal trains“ of Deutsche Bahn or the Interconnex, which is a lot cheaper – especially if you book online.
Berlin Linien Bus serve the route Berlin – Copenhagen via Rostock  Flixbus / meinfernbus serve direct routes from Berlin, Hamburg and other cities. 
InterCityHotel , Herweghstraße 51 (at the central train station)
Ferry from Gedser in Denmark every two hours
Hanse Hostel  – Doberaner Str. 96. Prices start at €14 for a bed in an 8 bed dormitory, for bed linen they charge €2 once per stay. Breakfast is available for €4, coffee, beer and soft drinks are available for €1. There is free internet, a great kitchen with a dishwasher, microwave, oven, stove and fridge. Bathroom facilities are very good. There is a TV, DVD and VCR downstairs as well as a bunch of board games, books and a dart board. The staff are very friendly and helpful and the place is clean, tidy and modern. Hanse Hostel is located at 96 Doberaner Straße near the corner of Lubeckerstraße, if your travelling by tram get off at the Maßmannstraße stop.
Die kleine Sonne , Steinstraße 7, at Neuer Markt
From Hamburg Central Station you can take the Regional-Express (RE) train to Rostock, or the faster IC (InterCity). If on a budget, buy a Mecklenburg-Vorpommern-Ticket. With this MV-Ticket, you can travel with up to 5 adults from Hamburg to Rostock. At weekends and during holiday seasons, you will see people (especially students) near the ticket machines asking whether you want to share a ticket, so it is worth arriving early and trying to find such an ad-hoc travel group. However, be aware that the „MV-Ticket“, like all „Länder-Tickets“, is NOT valid for the fast trains, IC or ICE! If you wish to travel via IC, you have to buy a ticket that explicitly states „IC“.
Hotel Verdi , Wollenweberstr. 28 (near the University of Music and Theatre and the Petrikirche)