If your car is a keyless car that has a key fob then the car can drive for about 3 feet or so without the key fob inside the car.
You can keep the key fob in your pocket or anywhere in the car and it should still start and run and drive as long as you have the key fob near the car.
But if you don't have your key fob for the keyless car then it will not start and run because the computer will not recognize it.
It's a feature to ensure that you own the car and can drive it and without the key fob the car will not start up.
So if you left your key fob in the garage or house then it will start and drive but only as long as you're within a 3 to 4 feet of the key fob.