Before switches, networks based on hubs data could only allow transmission in one direction at a time, this was called half-duplex. By using a switch this restriction is removed; full-duplex communication is maintained and the network is collision free. This means that data can now be transmitted in both directions at the same time.
Before switches, networks utilizing hubs could only transmit data in one direction at a time (half-duplex). Switches eliminate this limitation, enabling full-duplex communication and eliminating collisions.  This allows for simultaneous data transmission in both directions.