If you want to get in shape to run a marathon, then you have to start running.
If you've never done any sort of running before, then start out with walking about a mile, every day. When you can do this without being winded, step it up to jogging. When you can jog a mile reasonable well, then step it up to full running, and then increase the distance gradually from there.
Remember to warm-up for about 5 minutes and then stretch before beginning you regular work-out routine.