There are two things you can do to minimize gaps between boards on a hardwood floor: ensure you get professional installation and control the humidity of your home.
Good installation work will ensure that the planks are fitted well together, and that a tiny bit of room is left around the edges (under the baseboards where you don’t see it) for the floor to expand very slightly. All real wood expands in the presence of moisture, and contracts when it’s dry. You’ll need to keep your home at about 35%–45% humidity year round, so we always advise our clients to buy a hygrometer. Most homes will also need a humidifier on the furnace to reduce dryness in winter, and possibly a dehumidifier in summer.
That being said, it is almost impossible to totally stop wood expansion and contraction from season to season. As the decades pass, a bit of gapping on a hardwood floor is possible. This is a natural part of wood that we cannot change, as it is a natural material.
There are some DIY sites that advise using a specially made wood filler putty to eliminate the gaps between planks. Over time, however, this putty tends to crack, come loose, and get vacuumed up. There are services that can fill larger gaps with strips of wood.
If you find the gaps bothersome, and the idea of filling them doesn’t appeal, you have a couple of options:
Have your floor sanded and refinished to see if that reduces the appearance of the gaps.
Replace your hardwood floors entirely.