Switching power between two motors

I'm fairly new at microcontrollers. I have an Arduino Uno, and I wanted to use it to switch between two motors, using my DC power supply with 15V as their power source. I've tried it by hand (manually switching between the two) and it works how I want.

I want to switch at a rate of 10 Hz. When Motor 1 is off, Motor 2 is on. When Motor 2 is off, Motor 1 is on. How can I use the Uno to alternate these motors' connection to the power supply?

Assuming, you are talking about DC motors with 2 wires?

Then it will work either with one mechanical relay with switch 2x2 (or two relays 2x1), or 4 discrete MOSFET's to switch the motor power.

But: 10Hz might be pretty hard job for the relay on the long run.

Code for UNO should be pretty simple.
Just 1-2 output pins for the relay(s) or 4 output pins to switch the MOSFET's.

You might need some more electronic parts like resistors, capacitors to get a stable operation.

You do realise the resultant effect will be both motors running at 1/2 speed?

How can I use the Uno to alternate these motors' connection to the power supply?

For just one direction of motor rotation, just wire each motor to switch on with a transistor or FET. Then drive them with two pins and write the software so that one pin is always the inverse of the other.

If you want this automatically to happen then drive one from the pin directly and the other from the output of the first pin.

However this has all the hallmarks of a X-Y Problem