iTunes launches, and a dialog box pops up saying something to the effect of "This iPod is linked to another iTunes Library, do you want to link it to this computer?" If you click yes, it erases your iPod and syncs up with the new iTunes library, if you click no, it [the iPod] shows up under iTunes, but is not selectable. After if you clicked "No" and bring it back to your machine, it acts like nothing happened. If you clicked yes, and erased the pod and synced with the new machine, your machine will think it's a new iPod and you will need to re-sync with your machine.
So yes, you can charge your iPod on another machine without fear of losing your library.