Quaffing, done by hitting q, means drinking. Most often you quaff a potion, but you may also quaff from a fountain or from a sink.
Quaffing a potion of invisibility obviously makes you invisible and so on, but with fountains and sinks the results may vary greatly. For example, quaffing from a fountain may release a water demon that may grant you a wish, but it might also just summon an endless stream of snakes. If you quaff from a sink, you may find a random ring, but then again you risk creating a water elemental instead.