Yes, a car battery can drain even if it is not being used. This is because there are still some electrical components that draw power from the battery, even when the car is turned off. These components include the car's clock, alarm system, and other electronic devices. Over time, this can drain the battery and make it difficult to start the car.
If you are not going to be using your car for an extended period of time, it is a good idea to disconnect the battery to prevent it from draining. You can also use a battery maintainer to keep the battery charged.