There's details on how to implement Prolog (in Common Lisp) in Peter Norvig's Paradigms of Artificial Intelligence: https://github.com/norvig/paip-lisp/blob/master/docs/chapter...
There's also Implementations of Prolog: https://archive.org/details/implementationso0000unse (limited preview)