Is this the first altar made (Gen 8:20)? What is the function of an altar, anyway?

It does appear to be the first altar in the Bible. If Abel used an altar, we are not told so; if any of the other antediluvian patriarchs used an altar, again we are not told so. The Hebrew is מִזְבֵּחַ, mizbeach, literally, “place of slaughter or sacrifice.” Beyond that we are not really told much. It could have been a heap of stones, logs, or earth. It was probably nothing so elaborate as the altar of the Mosaic code, which was a very specific, and rather different, type of altar, albeit serving a broadly similar purpose.