Myoglobin is an iron and oxygen binding protein that is found in the muscle tissue of vertebrates and in nearly every mammal. Myoglobin is closely related to hemoglobin which is the iron and oxygen binding protein that is found in blood. The function of myoglobin is to bind oxygen when the concentration of oxygen is very high in the lungs.
There is still actually a lot that is unknown about the functions of myoglobin. Studies conducted with mice, for example, have shown that mice can make up for the loss of myoglobin and still function perfectly well. It is unknown if humans are exactly the same or not.