This simply lets you select any element from a document providing the means to perform an operation on that element.
Some example JavaScript:
document.getElementById('div1').style.color = 'blue';
document.getElementById('input1').value = newvalue;
The id on the tag must be set:
<div id="div1"></div>
<input id="input1" type="text" />