How would you train for a marathon?

If you are not regularly running, but are generally fit, it would require many months of training to complete a marathon. Running at least 3 or better 4 times a week will be necessary. You should gradually increase your training load. A good guidance is to not increase the total mileage by more than 10% per week. One of the weekly runs should be a long run. You can should start with a distance that you are able to currently run, and keep gradually increasing it every week until you are able to run 30 km. You shouldn't need training runs longer than that. You should be able to run 30 km about 6 weeks before your target marathon. In the last weeks before the marathon decrease it down to about 20 km. The other runs in the week should be shorter. You should start as short as you are comfortable, and then increase them until they are 10-12 km. You should run all these runs at an easy pace, that would allow you to hold a conversation.
Good luck with your marathon!