Several methods to get into a car that you've locked your keys inside:
1. Check ALL doors. maybe one is still unlocked or open?
2. Open up your wallet, and take out the spare key and unlock the doors.
3. Call up a friend, and have them get your spare key from home for you. Open up the door with your spare key.
4. Is there a window open enough to get at least an arm through? If so, you can (or find someone nearby who'll fit) reach in and open the door from the inside.
5. Do you have membership in an auto club or subscribe to a roadside assistance plan, such as AAA or Better World Club? (Or can you be "stranded" there with a friend who does?) Does your auto insurance come with a roadside assistance package? Or maybe a credit card perk of roadside assistance? These roadside assistance companies usually offer lockout services.
6. Do you have proof of ownership available somewhere (like the title or registration, or the bill of sale) either on you or at home? Can you have a friend drive you and this proof of ownership, and a copy of your vehicle's VIN, to a dealership? Visit their service department, and they should be able to make you a new spare key that'll open the door by looking up your keycut code attached to your VIN (make a new key without copying a master).
7. Call a roadside assistance company, tell them that you're not a member, but that you need assistance and are willing to pay (good credit card) for whatever lockout services that they can send out your way. Alternately, call a locksmith.
As an absolute last resort you could use a "slim-jim" or other metal coat-hanger-like device to reach through the window and jiggle the door lock mechanism to unlock, but you are more likely to damage the door innards than to correctly manage to unlock it on the first try...
However - if there's a small animal or a child locked inside, you'd be better off to smash a window (the smallest one that'll work) and get in that way quickly, as it would be immediate and you won't have to worry about child or animal endangerment, but then you'd have broken glass to clear up and then you'd have to fix the window, but you'd be in and have your locked-in keys! (smallest window as that'll often be the cheapest to replace. immediate as it can get very hot quickly (even if windows rolled down)...)