Taxi is always the easiest way. But for some visitors travelling on budget, it's convenient, economic and safe to take a bus in Recife during the day.
Take the bus #910 Heading Picdade/Rio Doce from downtown Recife or Boa Viagem, it will stop on Av. Sigismundo Goncalves in front of Placa do Carmo.
The fare is R$2.80/one way.
Getting to Olinda is very easy. You can go by public transportation (Bus), or by Taxi (on the meter). Once you have arrived, it is possible to travel on foot. But beware that this is a hilly region, good shoes should be worn, and if you are not in good shape, starting at the top and working your way down will be easier.