First, Hello and welcome to the forum! Glad you found us. This is a good place to learn more about bees and beekeeping.
Second, please update your profile to include your location. Much of beekeeping is "location-specific", so knowing where you are will help us provide you with better answers.
Third, I use the 'search' function a lot. Very often I find that my question has been discussed before, and I can get an immediate answer. If you search on 'ants' you'll find several threads with ideas.
Fourth, as others have mentioned, ants and hives tend to go hand in hand. Usually it's not a big deal, but again, that can depend on your location and what kind of ants you're dealing with. I'd recommend that you avoid using any kind of insecticide around your hives.
Lastly, annette has had success with cinnamon. I haven't. Maybe it's the kind of ants; maybe it's how much to use; who knows. The point is that with beekeeping, you often have to try different things and find out what works for you.