How often do you need to take a dog to the vet?

Some friend told me once a year or if they have any problems, another told me just once in the beginning, then to get spayed/neutered, and then only if there's any problems.