RUnning two programs at once

I have two Piezo buzzers, and I want to have them both playing different tunes at the same time in order to have a melody and background music. Is this possible? and if not, is there a way to get the one buzzer to play two notes at the same time?

Yes and no.

If your piezo buzzer is going to be driven by individual pulses from the Arduino, the code has to somehow interleave the pulse/frequency streams for two buzzers at once. That would lead to a complicated sequencing process that must examine both tunes, and swap back and forth as needed, assuming the two tunes are not always changing notes at the same time.

On the other hand, if you buy a couple of Nanos, solder pins on them, you can plant them in a breadboard, and use one each to drive the separate buzzers. Nano's are about $2.00 apiece, so this is a simpler and cheaper approach to the project. You will need some sort of sync pulse between the two, to keep the music on beat.

Good luck.

Two notes is easy - to play thru one buzzer easy way is to "mix" two outputs together to drive the piezo. One way to do that is to run each output thru a resistor, their junction then drives the piezo.
Better way is to mix them using an op-amp, set up as a summing amplifier, and drive the piezo with that output.
This could be a good one

Or use a Teensy, which is capable of this kind of sound manipulation.

The ATmega328 has three timers. If you learn to use them, you can have timer one implementing the standard millis() call, whilst the other two are used to generate independent tones.

This is not supported by any standard library that I know of, but is perfectly practical; you use millis() to clock through your tunes by determining when it is time to generate a new note for each of them, and set the two note timers accordingly.

You can generate as many tones as you like at the same time.
Google for plenty of examples and libraries.

Basically you use a timer to toggle a pin at the correct time.

MorganS:
Or use a Teensy, which is capable of this kind of sound manipulation.

And Teensy has libraries currently available that do all the mixing for you.

--- bill

Yes but a Teensy is vast overkill for tones. Files like WAV ones yes but not tones.