iv had my car sitting in my garage for a couple months now due to loss of licence, i had been starting it every few days for 10 minutes or so, then one day i went to start it it didnt start properly, revs were very low ( probably around 400 - 500rpm) and when i revved the motor it would stall.

that problem seemed to fix on its own after i started it a few hours later, but then a few weeks later i started it again and after a minute or so it started revving on its own from 1500 - 2500 ( around there ) every couple of seconds. it still drives properly but it wont stop this revving problem. any ideas on what this could be?
thanks