Take a direct one hour ferry from Buenos Aires. Arrive to the terminal an hour early for check in and make sure you have everything you need to cross the border. Passport control takes place prior to boarding. Buquebus, ColoniaExpress and Seacat are the three companies that make the trip. Check prices and timetables.
If you’re coming from Montevideo you’re only a short bus ride away. You can book online in advance but usually there are enough buses where that is not necessary. Check prices and schedules online.