The main problem if you get into a spin inadvertently is the disorientation. If your aircraft is fitted with a turn & slip (not a turn co-ordinator, it doesn't work); full opposite rudder to the turn needle. With ailerons neutral check direction of rotation. If rotation is same as yaw, you are in an upright spin and stick forward or as in the flight manual if it says different. If rotation is opposite to yaw, you are in an inverted spin, in which case stick back. When rotation stops, ease out of the dive - gently!
Best not to get into the situation that leads to an inadvertent spin, particularly close to the ground.