Barcelona's bike sharing system is called Bicing and is SO popular. Is geared towards residents and you have to be subscribed to using it. You pay 24€ per year, the 30 first minutes are free of charge. Bicing can charge you 150€ in case you keep the bike more than 24 hours.
To pick up a bike you have to swipe your card at the bicing station and the machine is going to tell you which bike you have to take. Take it and enjoy the city!