A groupoid is a set together with a binary operation . The groupoid (or “magma”) is closed under the operation.
There is also a separate, category-theoretic definition of “groupoid.”