One year is measured by the time it takes a planet to orbit the sun, and 365 days is the best estimate for how long it takes Earth to complete a full trip around the sun. Years on other planets are measured in comparison with the Earth year, and one year on most planets is longer than one year on Earth.
According to Northwestern University, it takes Earth 365.25 days (365 days and 6 hours) to orbit the sun. The trip is a total of 584 million miles. The sun itself has a small orbit of 223.7 million miles that only takes three Earth-months to complete.