As a temporary measure I have attached the overview spec of the general module framework written by Dave Stearns. He writes very clearly but this may not be perfectly up to date.
In terms of querying data you'll want to start with the LabKey Javascript API page here:
https://www.labkey.org/wiki/home/Documentation/page.view?name=javascriptAPIs
and end up on the specific selectRows API call here:
https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.Query.html#selectRows
Here's the simplest example of how to create a select box using HTML and script. In this example there's a list in the current folder called Reagents with fields ReagentRowId and ReagentName. Note that it's not yet possible to initialize a list with data from a file based module, though you can use SQL to create tables that are available for queries.
<select id="myDropDown"></select>
<script>
LABKEY.requiresClientAPI();
</script>
<script>
LABKEY.Query.selectRows({schemaName:"lists", queryName:"Reagents",
successCallback:populateDropDown});
function populateDropDown(data)
{
for (var i = 0; i < data.rows.length; i++)
{
var row = data.rows[i];
var opt = document.createElement("option");
opt.value = row.ReagentRowId;
opt.text = row.ReagentName;
document.getElementById("myDropDown").options.add(opt);
}
}
</script>
Note that the queried data is returned *asynchronously* and passed to the successCallback function. The populateDropDown function will be called sometime after selectRows is called (generally quickly, but you can't assume the drop-down is populated until you the successCallback function has been called).