If you have a Samsung Galaxy Ace which running on Android 2.3.6 GINGERBREAD you can easily root ,To check your device details just go to Settings -> About Phone and you can find all thing about your phone
What is Rooting?
For the benefit of those who are not familiar with rooting, it is like jailbreaking your phone to support neat new features normally not found on a smartphone. You can make your phone run faster, install custom ROMs, and install (sideload) applications from third-party sources once you gain root access on your device.
But you have to keep in mind that rooting your device could mean voiding its warranty. Although, there is usually the option of unrooting your device by updating it with a stock ROM. Overall, rooting can be a win-win situation.
WARNING: THE SAMSUNG GALAXY ACE WILL VOID THE WARRANTY.
DON'T DO WITH GALAXY ACE S5830 ;IT WILL DAMAGE YOUR DEVICE
1.Put update.zip in your main directory in the SD card.
2.Turn off your phone.
3.Boot in Recovery by pressing:POWER+VOLUME UP+HOME buttons.
4.In Recovery select Install zip from sd
6.Reboot your phone and it's ready.There must be a Superuser icon in your Apps menu.
How to unroot
1.Exactly the same just put the file unroot in your main directory and folow the steps.