In the United States the boundary is one year: more than a year gives long-term-capital-gain treatment, a year or less gives short-term-capital-gain taxed as ordinary income. The clock starts the day after acquisition and ends on the trade date of the sale.
Several rules suspend or reset it. A wash-sale-rule adjustment carries the old holding period into the replacement shares, straddle-rules suspend it while an offsetting position is open, and a deep in-the-money covered call can suspend it on the underlying.
Other jurisdictions use different thresholds for different purposes, such as the twelve-month test behind the australia-cgt-discount.
This is general information, not tax advice, and the jurisdiction matters. Rules change and depend on your circumstances; confirm with a qualified professional.
Related: long-term-capital-gain, short-term-capital-gain, straddle-rules, australia-cgt-discount, qualified-dividend-holding-period