If you hit a vehicle that is unattended, you should first notify the police. They will let you know if they need to be present to write an accident report. If the police are unable to come to come to the scene, or even if they are, you still should leave information on the car that you damaged so that the owner is aware of what happened and how to get in contact with you to have you pay for the damages or make a claim with your insurer.
The note that you leave on an unattended vehicle that you hit and the owner/driver cannot be found should be left in a place the driver will find easily such as under one of the windshield wipers. On a sheet of paper write the following information: your name, your address, your phone number, your insurance company's name, and your insurance company's claim phone number. You should then promptly notify your insurance company. Failure to promptly notify your insurance company of the accident may jeopardize your insurance coverage.
In many states they have specific laws about what you should do if you hit an unattended car. If you fail to call the police or leave a note you can be charged with a hit and run usually. For instance in Washington State their law requires that if you collide with a parked or otherwise unattended vehicle you must immediately stop and locate and notify the operator or owner of the vehicle and provide them with your name and address.
RCW 46.52.010 governs situations where a driver strikes an unattended vehicle or property where no person was hurt. A violation of this statute is usually called a hit and run unattended crime. The first part of the statute requires that the operator of a vehicle that hits another, unattended vehicle must immediately stop, and either a) provide the other vehicle owner with the driver's name and address, or b) place a note containing that information in a conspicuous place on the vehicle [like a note on the windshield].
The second part of this Washington State law covers the scenario where a driver strikes property (other than a vehicle) and no one is hurt. The driver must then take reasonable steps to notify the owner (or person in charge) of the damaged property of the driver's name and address, or the driver must leave that information in a written note on a conspicuous (easy to see) place on the damaged property. Failing to comply with the requirements of this WA law is a misdemeanor, punishable by up to 90 days in jail and a $1000 fine.
So your state law likely requires that you leave a note and if you fail to do so and are caught could be charged with hit and run and face penalties such as listed above.