the 1st suggestion is good. the short answer is - they get up at 5:00AM and run for about 5 months. J/K, sorta. It takes about 5 months to build up the endurance required to run 26 miles. It's easier to do as part of a group. There are lots of them out there today (more than 14 years ago when I did my first on my own). If you live close to NYC or in it, you should have many to choose from. Here in Memphis there's even at least one group around that would support that effort. If you seriously want to do one - let's say 50 weeks from today - you should start running some 5K and 10K organized runs for over the next 4 - 5 months. If you like them enough then look for a half marathon in the next few months that would be (on the calendar) about half way to the marathon date. At that point, with a few 5K or 10K's experience you'd have an idea of what pace you might be able to maintain. Whatever that pace is, add about 30 seconds to a minute for the first 4-6 miles. If you then finish it and want to continue training to pursue a full marathon you'll have an excellent base on which to build. If not - you'll not have wasted too many 5AM runs in preparation. On the way to run 26 miles you'll have many 10, 12, 14, 16, 18 and 20 mile training runs. Sometimes the only way to spend 3 hours running is to get up quite early - or else you run all evening. I've done both - and for me, morning is somewhat better.
Good luck, and let us know here how you do - what you choose, etc.