A day is the time it takes the Earth to spin once. It does this about 365 times as it goes round the Sun. So 365 days is the number of spins it takes for Earth to make one complete orbit. The reason it happens to be exactly 365 is completely random! There is nothing special about the number 365. The planet Mercury, for instance, takes 88 days to do one lap of the sun, so it has an 88-day year, while Mars takes about 687.
As to why a day is 24 hours, this is something we've inherited from the ancient Egyptians. About 4500 years ago, Egyptians were using sundials to measure time. For some reason nobody really knows, they decided to split a day up into 12 equally sized portions, what we now call "hours". So there are 12 of them in a day, then another 12 at night. This method of splitting an Earth-spin into 24 chunks has stuck mostly by accident. We could just as easily have chopped a day up into ten pieces and had a decimal system of time!