I don't quite get the definition and use case of an abstract machine and how its actually related to a compiler or interpreter
I googled what abstract machines were but understood very little out of it.
An abstract machine is a model of a computer system (considered either as hardware or software) constructed to allow a detailed and precise analysis of how the computer system works.
Here are some articles I read but understood not that much out of:
A definition of machine would be some working/processing engine. Here it means a computer. It relates to high-level language and machine code. An abstract machine is a model of a computer system/architecture. With many simplifications and generalizations. So the instruction set could be without registers but with a stack holding the operands of instructions.
A compiler or interpreter for code running on this non-existing abstract machine is much simpler to write, than for one single physical machine, and there exist many different physical machines.
You could write an interpreter for the code of your abstract machine and port that interpreter to many physical machines. Or you could compile to a physical machine by first compiling to the abstract machine code, and converting that to physical machine code.
Say you have L programming languages (Java, C) and M different systems (Windows, Linux on ARM, Androids), then going indirect via an abstract machine (JVM, LLVM) simplifies the effort to L+M implementations. Whereas otherwise you would need to write L*M implementations. Furthermore you entirely separate the aspects of programming language quirks and physical machine quirks.
The specification of an abstract machine, a high level theoretical computer, can be more universal and strict. And is just a tiny fraction of the specification of a real computer architecture. And it avoids bugs in chip design.
An abstract machine is the Esperanto intermediary for translating a high level language into machine language.