Many countries offer 30-day visa-free travel. Does that mean that many days in a span of a year, or does it mean 30 days every visit, i.e. one may leave and come back for 30 days the next day?
For the cases I'm aware of, it's per visit.
However, you're absolutely not the first person to think that 30+30=60, 30+30+30=90, 30+30+... and immigration officers are wise to this. Some countries have formal policies: for example, the Schengen area restricts visa-free visitors to not more than 90 days in the area out of any period of 180 days. Other countries have less formal setups: the US, for example, will get twitchy about people trying to stay more than 90 days in any 180 even though it's not a literal rule. The US also demands that you leave North America between visa-free visits: it's not enough just to go to Canada or Mexico and back.
I suspect that any country will refuse entry if they get the impression that you're trying to string together multiple short-stay visits into a longer one. Doubly so if they think that, really, you're just trying to live there. Remember that, in most cases, you have no right to visit foreign countries. If they have something like a 30-day visa-free visit scheme, that's not a guarantee that you'll be allowed in.