You'll arrive at the bus terminal (called "Rodoviaria Nova") in São José dos Campos and all you have to do is search for the ticket booth of "Passaro Marron" or "Litorânea" and "Ubatuba" written along with it. It's a small terminal, so it will be very easy to find it.
Here is Passaro Marron's bus schedule and prices for tomorrow:
Here is Litoranea's:
"Passaro Marron" only accepts cash payments in São José dos Campos, so make sure to have some "reais" (local currency) with you (there are ATMs at the airport). When you buy your ticket, they might show you the computer screen with the bus seating plan and ask you to choose a seat. When you get your ticket, you have 2 pieces of paper, one is your ticket, the other one is more bureaucratic (insurance) and you have to fill it out with your passport number, name of a person in Brazil (who will receive the insurance money in case of your death) and maybe a phone number as well and sign it.
Here's the bus company Passaro Marron's website (only in Portuguese):
Litoranea's website: http://www.litoranea.com.br/
Have a nice trip!
Edited: 3:24 pm, April 20, 2013