If you have attempted to open your car door with your key several times and it just won't open, there could be damage to the lock or the key, and you'll want to call a professional auto locksmith to come assess the situation. They should be able to get you in the car so you can use the ignition key to drive home. Here are some of the things that you want to take into consideration as you are assessing what could have happened with the lock or your key.
Damaged on Purpose
If someone was trying to break into your car to steal something, then they could have damaged the lock trying to get in. They also could be waiting for you to try to get in, and then when you are taking your time messing around with your key and wondering why it isn't working, they jump you. If you are suspicious this was done on purpose, call a locksmith, and don't wait alone.
If the temperatures are below freezing, the lock could be frozen. The locksmith can come to heat the door and key to make sure that they get in safely and don't do damage. If there was water inside the lock and it turned into ice and expanded, this could also cause damage to the lock. The auto locksmith can get you into the car so you can drive home, and they can even replace the lock if necessary.
Did you accidentally jam your key into the door and perhaps damage the key on the ring, or the lock? If so, the locksmith can get you inside the vehicle, and then you can drive it home if you don't have time to repair the damages immediately. A key that gets stuck inside the door or that breaks off needs to be removed, as someone could easily turn it and get into your vehicle.
If you have a sudden problem with your key or lock and you can't get inside your vehicle, and you don't know how to get to a spare, or if you don't have a spare, call a locksmith to get to the bottom of the problem right away. This will ensure that you can get into the vehicle to drive it home, and the locksmith will let you know what type of damages the door or lock has. Professionals like Stephen K Migoley can offer more information.