Old Macdonald had a farm is a children’s song each verse of which refers to the sound of a farmyard animal. There are several different early variations and several were recorded before the beginning of the twentieth century.
For further information see: https://en.wikipedia.org/wiki/Old_MacDonald_Had_a_Farm