This is a fun one. The two couldn't be more different from one another and yet they both achieve the same goal. For the sake of this post I am assuming marathons on paved roads and ultramarathons on trails.
Distance - This, of course, is the most obvious difference between the two, With the marathon at 26.2 miles and the ultramarathon any distance that is greater than 26.2. For example, a 50k is 31 miles. This doesn't seem like much of a difference, being only 5 miles, but after you've ran that far every mile begins to feel much longer than the previous or longer than the beginning miles.
Elevation - The elevation gain is the kicker when it comes to most ultramarathons since most ultramarathons are trail runs. This results in at least an elevation gain of around 4,500 ft or more. This seems very daunting at first, especially as you've ran half the race and you see a trail that just seems to be continually going up, and up and up. This plays games on your legs as well as with your head as you have to be ready to conquer the hills. How, you might ask? Well you conquer them by walking. If you are planning on winning the race, of course, then you probably are not walking the ascents, but for the average ultramarathoner you are walking virtually every ascent and running every descent.
Time - Because of the elevation gain and the forced walking in order to conserve your energy your average pace slows drastically. This results in a finish time much longer than the marathon. For example, I ran my most resent marathon in 4hrs38min and my 50k in 8hrs15min. A huge difference, and a lot of time spent with yourself and only yourself.
Hydration/Nutrition - In the marathon there are aid stations spread out everywhere, which gives the runner plenty of opportunity to make sure that there are plenty of fluids being drank. In an ultramarathon it is you and the trail with aid stations few and far between. This leaves you with at least one 20oz. water bottle and very possibly two, either handheld or on a hip pack. Because of the length of time you are out there and the energy exerted you drink a ton more fluids than you would during a marathon. Additionally, you need to consume quite a bit more during the race. In a marathon you can get by with a few Gu's if you want or even subsisting only on sports drinks and water. Not so with the ultramarathons, which entails packing some energy bars and other forms to consume a large quantity of calories.
Aid Stations - As mentioned above, the aid stations are few and far in between, leaving you more self sufficient with the ultras. Additionally, when you get to the aid stations you have a whole array of food (such as M&Ms, chips, brownies, potatoes and salt, pretzels and so on) that you can munch on while some volunteers fill your water bottle. With the marathon there is no food and oftentimes the sports drink is watered down to make it spread further (which doesn't absorb as well) and maybe, if you are lucky, you'll get some Gu packets or something. The water is handed to you in little dixie cups with about an ounce in each, which doesn't do much unless you walk through and grab five or six cups.
Your Body - This was the most interesting difference. With the marathon you are pressing a lot harder in order to maximize your time and attempt to achieve a PR. This, of course, stresses you body right off the bat. Then you throw in running on concrete for 26.2 miles and your body takes a beating. The ultramarathon, on the other hand, is run at a slower pace and you have many walk breaks to give your body a rest. The hills utilize different muscle groups so the variation is easier on the legs than running on flat streets where you stress the same muscle group over and over. Ultramarathons, surprisingly, are much easier on the body than a marathon and my recovery time was much faster than after the marathon.
Runners - Marathons, of course, draw a much larger crowd. This makes for your 26.2 miles to be ran almost entirely with someone either around you, in front of you or behind you in sight. There are always people talking and there is the continuous pitter patter of running shoes on concrete. They are also nice but generally stay to themselves. The ultramarathon is usually no more than 100 runners, oftentimes maxing out at 50. Since the race is so long the runners tend to spread out and you can go for hours without coming in contact with another runner, although you can usually see them way off in the distance in front of you or behind you. Additionally, contact is very short, but when you do come across another runner they are very cordial and encouraging.
Course - Marathons are oftentimes run on street with volunteers spread out throughout the whole race guiding you. Ultramarathons are usually trail runs which means you have to keep a vigilant eye out for the little pink, fluttering ribbons warning you of a turn coming up. It is easy to get lost and lose an hour or two and log in some extra bonus miles.
Accomplishment - This is the end goal that is the same in both. You feel you have achieved something with both. But, I must say, the ultramarathon tickled me more than finishing the marathon.