the "more like this" function

I'm curious about the "more like this" function. Is it done automatically, or does an administrator do it? How does it decide what pieces are like the newly published piece?