Will restoring a jailbroken iphone mess it up?

My iphone was already jailbroken when i got it-i upgraded it and it got stuck in dfu mode--i got it fixed--i have a 3gs by the way and the firmware is 4.1---im afraid i might mess it up again and i was wondering if restoring it through itunes will mess it up cus cydia is in it and i dont know how to take it out…

Restoring will put it back to the way it was before you jailbroke it. But you'll have to sync all your data back again.