If you mean how do you remove spaces from user entered data on registration before it is saved, then:
The registration function within the User Registration Model enables the User Plugins before saving the user data so you should be able to use one of these to clean up the data.
If you look at plugins/user you will find an example profile plugin. This has a plugin.php file and within that there is a onUserBeforeSave event.
You should be able to modify this to create a simple plugin to do what I think you want to do. Sorry if I misinterpreted it.
Regards,