Make a plan and educate yourself.
At the beginning I had the motivation "I'm going to do something I will be proud of and something I achieved all by myself". But a plan is the key for a good marathon. So I'm planing my runs and set goals. For example: In July I want to run my first 21-24k run. Unfortnuatly I injured myself and I'm going to do my best to run without having pain in my ankles. I had a one week break and going to do a small run today. At the weekend I'm away in Bamberg. But at monday I hope i can start my training again. I run 3-4 times a week. I do two short runs (7-10k), one longer run (14-16k) and one really long run (21-26k). It's important to have a good mix of longer and shorter runs. I also run the shorter runs faster to increase my speed and I do the longer runs in my normal marathon speed. It's important to stretch after and before a run (but not right after a run). I always shower afterwards and I use cold water for my legs to relax them. I run in the morning so I stretch in the evening after my run.
If you're a beginner: plan your marathon at least ONE YEAR a head. Start with 3k and slowly increase the kilometres and the speed. Don't over-train, it's going to lead to failure and disappointment. Be kind to yourself. If you a "advanced" runner like I am - I can run 1h30m or 14k without any problems- then 5-6 months will be enough. Just slowly increase the length of the runs. And 2 month before the marathon try to run 3-4 times a week: two 7-9k runs, one 14-17k runs, one 21-25k runs. That will be an amazing training. If you want to run longer - just do it!
3 weeks before the marathon do you longest run! Around 30-32 miles (32 miles would be better). It's an amazing training. You can see if you're able to run LONG and can keep your speed. In the last 2 weeks I wouldn't do long runs anymore. Maybe some 14k runs and one 21-25k runs. Your body needs to relax as well :)
Read up about marathon training, nutrition, shoes, outfits, speed and so on. It helps to get the best results with your training and keeps injuries away.
A good playlist and audiobooks: Running can get really boring if you run 14-25k a lot. I listen to music or listen to audiobooks. It really helps to forget that you simply running the same routine all the time. I really love listen to books. But: keep an eye one your speed. While listening to audiobooks it's easy to run slower.
Run a little bit faster, a little bit longer, smile - enjoy it: If you found your right speed and you're really enjoying it - challenge yourself! I like to run a little bit faster and say to myself "You can do it! Run a little bit faster for 2 minutes!". Often I smile while running faster because it just makes me so happy and I really love the feeling of challenging myself.. And if you end your run but you want to run longer - just continue running :) Challange yourself :)
Motivate yourself with videos about marathons: I like to watch videos of marathons or people / vloggers who run marathons like Niomi Smart. It just motivates so much because you want to experience this amazing time as well :)
Invest in good shoes and a puls clock: I would highly recommend you to invest in good running shoes and to buy them at a special shop for running shoes or a sports shop. A puls clock also helps to controll your heart rate. It's not healthy to run to fast. If you heart beat is over 180-190 for a long time it's not healthy. Very experience runners can run with this heart beat but people who run as a hobby should run between 160-175.
Listen to your body. Never run if you're not feeling great: This is my number one. I never want to force myself to run because I want to keep loving running, Of course sometimes I need motivation to run longer and faster. But I also have days on which I'm so tired or sad I don't want to run. And it's ok. I keep doing my best and keep running. That's count :)
Drink enough & sleep enough: It's so important to drink if you run longer than 10k. Your body needs water. You're going to break down after some kilometres, getting slower and it's getting harder. It's also important to get enought sleep especcially before a long run. Your body needs to rest to be able to run long and fast.
Don't use marathon training as a way to loose weight - cause you need to eat more: You maybe lose some weight, but not as many as you think. Because you need to eat more. Before long runs I eat about 80g of oatmeals and a banana right before the run. If I run more than 16k I also eat a banana during my run. Your body needs food! Often I'm not hungry after long runs but at the evining I'm starving and I need to eat a lot of food. But it's ok because I often burn 1000-1500 calories during a run. But your body needs some of these calories back. And it's ok. Focus on a healthy diet and your training not on weight loss.