Starting in March 2013 the United States will move to a First to File patent system. This will be a big shift in policy. The United States has always been a "First to Invent" patent system. This means that if two people invented the same thing, whoever could prove to the patent office that they invented it first would be get rewarded with the patent. Even if the other person actually filed a patent first. This type of system is called "First to Invent" because whoever could prove they were the first to invent something would win.
Can someone steal my idea and beat me to the patent office?
No. Under the new law you can request a derivation proceeding which gives you the change to prove to the USPTO that someone saw your idea and got their patent filed first. As long as you can prove this, then you should be awarded the patent and not them.
In 2011 the United States Congress passed the America Invents Act. One of the important pieces of this legislation was changing the United States to a "First to File" patent system. Starting on March 16, 2013 it will no longer matter who actually invents something first because whoever files their patent first will be the one who gets a patent. For this reason it will be even more important to get your provisional patents filed quickly and the patent office is expecting an increase in provisional patent filings.