The switch will fully load the incoming frames of data, from the two sending systems, into its buffer(s). I'm not sure how it determines which frame would be first in the queue for subsequent forwarding; but it's probably based on initial receive time of the beginning of the frame. Then the switch works through the transmit buffer queue sending the frames out one-by-one onto the destination port/segment.
There's no issue with frames "running into each other." The real issue is can the ultimate port/segment accept the frames fast enough. (And, of course, can the switch process its buffer/queues fast enough.)
You seem to be confused about logical topology (bus, ring, star). Ethernet has a couple of different topologies, but token ring has only the logical ring topology.
Full-duplex ethernet doesn't use CSMA/CD because it has separate send and receive paths between two devices. When you share send and receive paths, then you must use CSMA/CD in order to detect collisions (two devices sending at the same time). With full-duplex, there is no possibility of collisions; the send path on one device is the receive path on the other end, and vice versa.
A hub means you must use half-duplex because the possibility of collisions exists, and you must detect the collisions, so you use CSMA/CD. The devices connected to the hub take turns sending (and resending when there are collisions). Each will have the opportunity to get frames on the wire, so, yes, they can ping each other at the same time.
For ethernet: Coaxial cable only has a single path, so it must be half-duplex. UTP cable as point-to-point between two devices can use full-duplex because each device has separate send and receive paths, but on a hub, you have multiple devices trying to send on on the same path, and receive on the same path, so you must use half-duplex with CSMA/CD. Fiber will have separate send and receive paths.
For token ring: there can be no collisions because only one device possesses the token at a time, and no device can send without possession of the token.
For Wi-Fi: all devices share the medium, so there are going to be collisions. Wi-Fi doesn't use CSMA/CD. CSMA/CA was developed for Wi-Fi to try to avoid collisions.
Best Answer
Theory
By convention, a collision domain is a contiguous wired and / or wireless half-duplex segment (typically using CSMA/CD), which is a subset of the subnet or vlan's broadcast domain.
How Ethernet switches control Collision Domains
Ethernet switches control collision domains because they can join half-duplex and full-duplex links within the same broadcast domain; Ethernet switches buffer frames to assist the transition between half-duplex and full-duplex links.
Example:
This shows a strange network which illustrates how collision domains are a contained within a broadcast domain, and how devices form boundaries for each one.