A longhorn beetle; Pretoria, South Africa.
These colorful critters spend most of their lives as wood boring larvae, and they can indeed spend years that way. Then the colorful and short-lived adults emerge. They mate, lay eggs and die. In some species, the adults do not even have mouthparts and their adult lives are measured in hours or days rather than weeks. They are mostly harmless, though some species can be a problem because of the damage they do to wood.