Depends on what type of device. If its a USB pen drive for example, use Finder and eject the drive, just like a normal 'drive'. Same deal with an iPod/iPhone - it should be ejected, but use iTunes for an iPod/iPhone.
For a peripheral (scanner, keyboard) just unplug it.
In short, if the device contains 'files/music/photos/video' it should be ejected.