Source: I've done one marathon, a 50k, and many, many, many runs at distances under that. I'm no expert just relaying what I've learned and come to understand. Hope you find it helpful.
The key to running marathons is, well, running. Strength training is important as well, as building your core and supporting muscles will aid in your overall stamina. I think most marathon training programs advise having a base of 15-20 miles/week, and are structured something like this:
Long, recovery, rest, run and strength, run, run and/or strength, rest, repeat
At the peak of training I think you get about 35 miles/week. I've seen a couple other posts by you asking about the Couch to 5k program, which I've heard is awesome. Keep in mind that's an 8 week program, and building up to a 10k takes additional time. You'll eventually see whether you have the desire to keep going or not. Marathons aren't for everyone, and they're not simple. I encourage everyone to try it out, I personally love running, but there are people out there who have zero desire to run for 3-6+ hours.
Training for a marathon is a commitment, and I encourage you to take it seriously if you really want to complete one. Don't skip runs, do the distance on the schedule, push yourself up those hills and try to get better each time, run those speed workouts with power, not letting tired muscles or hard breathing convince you to walk. Much of running is a mental game, figure out your breaking point and see if you can move past it, challenging yourself.
You can probably run a marathon within a year if you go about it smart and can remain dedicated that long. Training plans are 12-20 weeks, depending on intensity and who wrote them, then you need to add the additional time for the other milestone distances.
Another thing to keep in mind, and is different for everybody, is nutrition and hydration. On your long runs through training, you need to experiment with different calorie sources and hydration strategies, not only during your run, but the hours leading up to it. Do you need to drink a liter of water before you even start the run? Coffee? Coke? How about eating cereal, bagel, eggs, toast, banana, super green power smoothie, ice cream? What is it that helps you feel good during your run, is what you need to figure out.
Not eating enough, waiting too long to eat/drink, too much or too little water, electrolyte loss/intake can lead to nausea, bloating, cramps, exhaustion, etc. You can still most likely finish a race feeling like this, but your mind is very persuasive in telling you to give up.
Having the right shoes will help you a lot. Check out stores around you and see if any provide gait analysis. The plethora of running and athletics shoes is astronomical these days, so finding a knowledgeable person who can fit you in the right shoe is pretty critical to helping prevent injuries.
Getting clothes specific for the sport will help out too (especially for the proper seasons...running in 20 degrees in sweat pants instead of winter tights is a terrible idea!). Shirts, tanks, shorts, skirts, tights, socks, hats, etc can all drastically change a run, so find what brands, materials, and sizes work for you. Since you're a lady, I'd also highly recommend getting fitted for sports bras. I don't pretend to know much in that area, but if you don't have the right one, it can lead to unhappy times I've heard.
While road marathons have aid stations quite frequently, I'd still advise the purchase of a water bottle. I prefer handheld, but they have ones that slip into a belt or are strapped around you waist. You can also consider hydration packs (think CamelBak) specifically for running. Lots of pouches/pockets for food, phone and id, jackets, gloves, anything you might need on a long run.
Finally, this guy's done talking!
Last thing, I promise: enjoy yourself. Running is great! Whether you run solo, with a friend, or with groups of people, you have to enjoy it. If you pound through every step with frustration and a dismal outlook on the next x miles, it makes the run so much harder to complete, and even harder to lace up the next morning and do it again. Take in your surroundings, have conversations, solve problems...whatever it is that makes you happy, see if you can incorporate it in your run!