This depends on the KVM switch variant. These switches come in a wide range of shapes and sizes. If you are looking for a simple switch to control 2 or 4 computers, then they won’t take up much desk space due to the small size.
Large KVM switches used for offices or enterprises will take up a considerable amount of space. You also have to account for the wires that are connected to the switch as it will require some room as well