My car is a 1997 Z3 1.9L, M44 but I think this is the same on all 4 cylinders engines.
So, to start you will need some tools and a new starter !!
Tools are spanners (size 8, 10 and 13) for the wires. And a female torx socket size “E12” for the mounting bolts.

The access to the mounting bolts is not easy so I’ll advise you to get a ratchet with the smaller head you can find. I had some trouble because the head of my ratchet was too big and I had to use other tools to do the job.
On the picture bellow we can see the tools I used:

And here is the assembly which was the most helpful :

So, here is a general view of the engine bay, the starter is on the right side :

We only need to remove the oil stick holder and we have an easy access:

To remove it you only need to unbolt a nut using a size 13 spanner and pull the holder. As soon it’s done, plug the hole with something to avoid anything to fall into the engine oil.

Now we can start to work on the starter.

Now unbolt the two mounting bolts:

You managed to undo the two mounting bolts: Congratulations!
It’s now time to celebrate with the drink of your choice (it will be a beer for me…) but first unplug your battery, the alarm should ring for about a minute so go away and enjoy your drink!
Now the alarm is off, you can undo the three cables at the back of the starter starting by the biggest. The other two are not easy to access; you may need to rotate the starter to have a better access.
It’s easy to lose one of these nuts deep in the engine bay so to prevent this I used a piece of cloth that I put underneath the starter while working on it… just in case!

You may have some trouble to remove the starter from his location. It’s because there is a locating pin which can be a bit rusty and hold the starter in place

By using a hammer and a screwdriver you should be able to remove it whithout to much trouble, a bit of WD40 might help…

Job done.
After all this you should have no trouble to put everything back together with of course a new starter.
Mountings torques are :
Size 8 nut : 5 Nm, size 10 : 7 Nm, size 13 : 13 Nm.
Starter mounting bolts : 47 Nm.
Good luck.
Hope it’s help.