YugabyteDB is a distributed SQL database that supports both colocated and non-colocated tables, which are useful for specific use cases. A non-colocated database has all tables distributed across the nodes in a cluster, with hash sharding applied by default and partition columns used to determine node placement. In contrast, a colocated database is created using a CREATE DATABASE command with the WITH COLOCATION = 'true' option, where all tables are colocated unless explicitly declared otherwise. Colocated tables are organized by the sort order of their primary key columns in one tablet only, while non-colocated or distributed tables can be hash sharded and also range sharded if needed. The choice between colocated and non-colocated tables depends on the specific use case and requirements of the application.