Looks like they come as small as 6 X 10. Not sure how much extra space you need for filters and pumps and jets, but they are specifically designed for teeny spaces.
Katie1341 seems to have answered the question of how they work (Yes, the water does flow over the edge, gets collected and pumped back into the pool.)
As for does it always have to be the edge of a visual cliff… it wouldn’t have to, but what would be the point if it didn’t? You can’t enter or exit the pool over the edge the water is flowing over. If it doesn’t face off a cliff, then you’d have to have a ditch next to one side of the pool for the water to flow into. Nice place for people to fall in!