Depends on what you did to it. If all you did was put some apps on it, you can go into settings to do a factory data reset. If you tried to root it or install a custom ROM or firmware, then you would need to access the recovery boot menu and restore the backup you hopefully made.