The car was parked for a while before I purchased it. When it was purchased it was driven from point A to point B without any issues until the next day when we started the car wasn't idling normally it kept going up and down. When we put the car in gear it shuts down. The only way I got it in gear without it shutting down is by letting it run for about 10 minutes without interference.
My car has an automatic transmission.
Smaller engines tend to be picky about the simple components. Stalling issues are generally due to a sensor, or lack of fuel and air. To start you want to do a general assessment of the vehicle. The air filter, fuel pump, fuel filter, and spark plugs need to be in good condition. When was the last time you had a tune up? The fuel system in particular will cause these issues. You can test your fuel pressure to make sure you are getting an ample supply. Then assuming the vehicle is in good running condition you may want to look into the idle control valve. Engines that are cold will need a higher idle, and if they do not receive this, they will stall. You may also benefit from having the vehicle scanned for diagnostic troubleshooting codes. If the issue is coming from an electrical issue, you may find it here.