US consulates all over the world are an arm of the US State Department. They are given the responsibility of issuing permanent (green cards) and temporary visas for people outside USA.