I don't understand 5he example on the homepage. How does the extension know what is "buy it again"?

"Buy it again" is simply a name for the PostgresML project that the model is being trained for.

There is deeper explanation in the README: https://github.com/postgresml/postgresml