May I get explanation for this Map method

May I get explanation for this Map method



What is going on here, what is the scenario that makes one understand these following two statements: 

$("div.dcell").map(function(index, elem) {
                return elem.getElementsByTagName("img")[0];
            }).css("border", "thick solid red");

            $("div.dcell").map(function(index, elem) {
                return $(elem).children()[1];
            }).css("border", "thick solid blue");