There's a range of frameworks that'll do the trick for you.
An easy and common one is jQuery Dialog (http://jqueryui.com/dialog/)
A small example, given the html:
<div id="dialog-modal" title="Basic modal dialog" style="display:none">
<p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>
<a href="#" id="openDialog">Click me</a>
Assuming you've included jQuery and jQuery dialog on top, add the following javascript:
<script>
$(function() {
$( "#openDialog").on("click", function(){
$( "#dialog-modal" ).dialog({
height: 140,
modal: true
});
$( "#dialog-modal" ).show();
});
});
</script>