Flats are part of riding a bike. It happens to everyone at one time or another! Fortunately, it is a simple job to figure out what's going on, and change it yourself.
Here is how to find and diagnose the source of a flat:
And here is how to change a flat:
We also suggest you replace the rim tape with heavy duty or cloth rim strips. This will help avoid future issues. Once the rim strip is on, inflate the tube slightly to give it form and place it inside the tire. Push the valve into the valve hole on the rim. Place one side of the tire/tube over the rim and massage the tube inside the tire over the rim. Then, starting at the valve, work away from the valve pushing the remaining bead of the tire onto the rim. Carefully fill the tube with a little air (15-20 PSI), and inspect the tire to see if it's seated right (no bulges) by spinning the wheel and looking down it. Continue to inflate tire slowly to the recommended PSI rating. Consider at some point purchasing heavy duty or "thorn resistant" tubes. A kevlar belted or other puncture resistant tire is always a good upgrade as well. These tires typically last longer and are your first line of defense against road debris.
Before mounting the new tubes, please remove the original tire and tube from the wheel and inspect the inside of the rim to make sure that there is nothing sharp that may puncture the tube. Carefully run your finger along the rim to feel for any protrusions. If there are, you may need to file them down. Also, refill the popped tube to see if it was pinched during inflation. If it was, there will be two holes close together. This is called a "snake bite" and can be avoided when filling the tube with air (giving it form) during the installation of a new tube.
We hope you learned a lot!