Very simple. The odometer goes out in these cars often; the cogs get soft over time and the teeth chip off. Understandable for being 25 years old! You'll need to identify which odometer replacement kit you need to buy first: Motometer ($30) or VDO ($15). Typically this will be identified above the "CHECK" indicator between the MPH/KMPH gauge and the RPM gauge. However, it's highly recommended that you remove the instrument panel and inspect the broken parts first before buying the replacement parts, as buying a kit by going off the label alone has only a 70% success rate.
Here's a page on how to remove the instrument panel: http://www.rtsauto.com/fixing-e30-odometer-gears/
Here's a website you can buy your odometer kit from: http://garagistic.com/index.php?page=bmw-e30-odometer-trip-repair-vdo-kit