You can connect 'anything' to a Raspi - most devices (other than LEDs etc) will require some form of buffering and there are many ready-made modules that can be used depending on the device you want to drive.
Relay modules will, perhaps, offer the simplest solution as the relay contacts can drive 'most' loads - you can even drive a small DC pump/motor/whatever using a simple transistor or MOSFET.
There are ample beginners guides to interfacing the Raspi and I'd recommend you look for the Raspi magazine (downloadable from many internet sites) which cover interfacing the Raspi in many, many applications.