The first generation xB was sold from 2004 thru 2006. It was powered by a 1.5 liter 4 cylinder engine making 110 horsepower. Transmission options were 4 speed automatic or 5 speed manual. The design was radically different than most other cars on the road, and you either love it or you hate it.
The second generation xB was made for the 2008 model year. The top engine is now a 2.4 liter I4 making 158 horsepower, which is quite an improvement over the first generation model. Standard features include ABS and six airbags, making the Scion xB one of the safest cars in its class.
The design for the second generation model features more rounded corners, making it a bit more conventional and easier to like. The car is still not well-liked by many car enthusiasts.
Toyota/Scion keeps adding new features to the xB in an apparent attempt to woo the young, college student market. It might be working, with iPod connections and more speakers than you'll find in a rappers Lambo.
The xB is just starting to show up on the used car market. You can find some good deals on eBay, but if you wait a year or two you'll get a lot more of the added features of that newer second generation model.