How did Noah fit all of the animals on the ark?

In short, Noah did not fit all of the animals on the ark.  There is no boat in the world big enough to hold all of the animals.  God commanded Noah to take two of each kind of land-dwelling animal on the ark.   It is estimated that there are about 8,000 kinds, but this is a liberal figure, and the number may be much lower. Noah took two of each kind of animal (male and female), so he would have a maximum of no more than 16,000 animals on board.  This is a conservative amount.  In the study of baraminology (created kinds), scientists are findings that it is possible that even fewer animals were needed on the ark. Were dinosaurs on the ark?  

Source: Answers in Genesis

Although there are some big animals in existence, like elephants and hippopotamuses, the average size of an animal, when you take all animals into consideration, is the size of a sheep.  This includes dinosaurs, which, like all other animals, start out small.  Noah’s Ark could have held 125,280 sheep-sized animals, but Noah did not need that many animals.