How do you define intelligence?

It was written over 40 years ago so some of the factual elements are a bit dated but The Dragons of Eden by Carl Sagan (text downloadable at the link) frames this question very well and discusses the hypotheses that seek to answer it.

There is no unitary definition of intelligence. It’s existence has been assumed. The assumption that drove the question historically was that there is something unique about humans that distinguishes us from other lifeforms and that something includes “intelligence”. Like many terms whose etymologies predate modern biology, it is largely pointless to attempt to shoehorn it into a technical definition rooted in science. There are things that make humans unique and some of those things combine in ways that manifest as what we call intelligence but the context in which “intelligence” has led to a divergence (if that’s the correct term) between humans and other living things is cultural, not biological. Culture is rooted in the ability to use language. No other species uses language the same way Homo sapiens uses language, especially as a medium for storing and transmitting information in written form. Other organisms may possess an innate ability to use language in similar ways but, if so, they don’t do it.