Before you go mountain biking, be sure to bring along some standard items each time to avoid problems. It is essential that you have tools, supplies, food and water. Since you won't want to carry any extra weight, only take what you need. With careful planning you can be prepared with a minimum of items.
One of the most important things is a spare inner tube, and the tools to change it. Nothing can stop your ride faster than a flat tire, and if you are far out on the trail, it can mean a very long walk home. If it's late in the afternoon, you could also run out of daylight. Getting trapped in the dark is no fun. All you need to prevent this scenario is a spare tube (with the right valve type - there are two: presta and schraeder), 3 tire levers to get your tire off the rim, and of course a pump. Mini-pumps work just fine. Cautious types may also want to carry a tube patch kit in case of another flat. If you have never changed a tube before, it's a good idea to practice at home first.
Mountain bikes are put together with allen bolts so make sure you carry a folding set of allen wrenches. Extended rides over bumpy trails can tend to make bolts loosen up. You also may want to make adjustments while on the trail to your brake or gear levers. Allen keys sets are quite small and inexpensive. If you know how to use a chain tool it wouldn't hurt to bring one along in case your chain let's go or requires adjusting.
Be sure to take adequate food and water for your ride. Powerbars are great bang for the buck. They work very well and prevent you from running out of energy. Riding when you are exhausted is no fun and risk of injury increases because of lack of focus. Water is critical. You can use water bottles if you bike frame has the mounts or a popular alternative is a Camelbak backpack bladder system. It also has ample room for tools and tubes. Or you can use an under-seat pouch.
Always make sure you are dressed appropriately for your mountain bike ride. Keep in mind you will warm up quickly after starting your ride, so don't wear a heavy jacket that you'll end up removing it after 15 minutes. It's best to dress in a series of light layers. Keep in mind that if it's wet or cold, your feet and hands will feel the cold the most. Wear riding gloves and socks suited to cycling. Your local bike store can assist you in selecting the correct gear for the kind of riding you will be doing so try and establish a good relationship with them.