This should probably be in "Help For New Tamagotchi Owners."
You can buy Tamagotchis at Target, Wal-Mart, and Toys-R-Us. That's where I've always gotten them. You can even get some of the older versions, still, if you're interested in them. The V4.5 is pretty cool.
But like everyone else is saying, you can shop for them online, too. There's a chance they'll be secondhand, though. Whatever you like, though.
Usual toy stores (Toys R Us, KB Toys, WalMart, Target, etc.) for the more recent ones. For the older ones, Ebay or Amazon are your friends. Occasionally, you can find them in drug stores like Walgreens (as someone mentioned above) or thrift stores/garage sales/Salvation Army.