It works only with turkish coffee, because it's not filtered, so the powder sits on the bottom of the cup when you're finished drinking, well, sipping it.
The process requires turning it upside down on its little plate. It's left so for a few minutes, so the leftover liquid which is still there will ooze down the sides of the cup. There will be some random patterns. Then someone is looking into it for you, trying to divine any symbols, signs, portents, omens and whatnot from these patterns. Usually it's about your near future - a visitor coming, you will cross a big water, you will meet someone, there's trouble ahead etc.
This is not true fortune-telling, as anyone can do it, and there are no real rules, no catalogued set of symbols. I guess the same set of symbols may mean many different things, depending on where you are and whom you ask - a single washed-out streak may be a road or a river, a triangle may be a sail or a mountain etc. It's more of an inspirational thing, passed to the next teller by sheer watch-and-learn. Nobody takes the predictions seriously, except when they accidentally come all true.
There are a couple of variations - whether you turn over the cup or not (i.e. whether the patterns are created by coffee flowing from the bottom to the edges or the other way around), and whether you stick your index finger in the center of the bottom and twist it to get a personal extra bit of a pattern.
Accidentally, the same word, "šolja" (from german "Schale") means both a cup and a toilet seat - and sometimes someone will make a pun ("want me to look into your cup?" - "too late, I flushed it already").