Draw a fragment and every compound containing it comes back. The screening and the atom-by-atom match both run in the page, against the same database the SQL editor queries.
Ask the same question of a chemical dataset in SQL and in Mango and compare the two answers. The database is a SQLite file your browser downloads once and queries locally, so nothing you write ever leaves your machine — which is also why the tool needs JavaScript.