These two answers, using jQuery, will quickly explain how to create your own pop-up modal dialog box (also known as a lightbox).
jQuery Lightbox appearing blank
Prevent modal from scrolling
A modal is just a pop-up dialog box that: (a) pops-up overtop of other content, and (b) usually prevents you from interacting with the underlying page until it is closed.
and
A lightbox is just a regular DIV structure that has been styled position:absolute or position:fixed to remove it from the normal HTML flow. It is then hidden, and displayed when desired upon a button click or other detectable event (mouseover, ajax.done, etc).
Positioning the dialog and making it look great(er) is the job of CSS.
Note that you can also use a library/framework, like Bootstrap or jQueryUI (a separate, complementary library that works exactly like jQuery and provides many additional features), to provide pre-fab dialog boxes with skookum CSS that already have many working bits pre-done for you.
https://www.w3schools.com/bootstrap4/bootstrap_modal.asp
https://jqueryui.com/dialog/
It is most important, however, for you to understand what a modal dialog is before you choose to use a library. And, since it only takes 5 minutes to comprehend the first linked answer above, it is easily done.