An ultra-marathon is any distance beyond the standard marathon distance of 26 miles 385 yards, although most people consider ultra-marathons to start at 50K (31 miles).
There are two basic types:
A fixed distance eg 100km
or
A fixed time eg 24hrs.
The fixed distance type can be further split into continuous events and multi-day ones.
And that is about it for definitions, except to say that, like most other running events, they can be on a track, on the road and off-road.