Technically, 'havoc' means 'devastation', and 'wreak' means to 'take vengeance' or 'inflict damage'. So literally this phrase would mean to 'inflict devastation out of vengeance'.
In common parlance, to wreak havoc is to cause chaos, or to break things -- generally with no overtones of vengeance intended.
Examples:
"DMan wreaked havoc within the E2 community."
"He should wreake him on his foes."
-- Chaucer
To waste and havoc yonder world.
--Milton