Harkla is a great verb that means something close to 'to clear one's throat'. This can be the half-coughing sound you sometimes make before speaking to make sure you can talk clearly, or it can refer to the action when you have a cold and need to clear your throat to dislodge phlegm.
Harkla is most often used as a reflexive verb, meaning you follow the verb with a reflexive pronoun (those are mig, dig, sig, er and oss in Swedish, equivalent to myself, yourself, himself/herself/itself, themselves, and ourselves in English). So for example: jag harklade mig innan jag började prata (I cleared my throat before I started talking).
But you can also use it as an intransitive verb, meaning it's used on its own without a reflexive pronoun or an object. This is much less common, and usually refers to ongoing periods of throat-clearing, for example: jag har hostat och harklat (I've been coughing and clearing my throat).
Harkla has existed in Swedish for many, many years and though its origin isn't clear, it's very possible that it's at least partly onomatopoeic, meaning the sound of the word echoes the action it describes.
There's a whole family of words related to harkla too.
There's the adjective harklig (meaning something like 'throat-cleary' in imperfect English, or 'constantly having to clear one's throat'), so you might say jag är hostig och harklig (I keep needing to cough and clear my throat).
And there are not one but two related nouns. The word en harkling (a clearing of one's throat) typically refers to a one-off incidence of throat-clearing, for example: jag hörde en harkling (I heard someone clear their throat). The other noun, ett harklande, implies a more long-term or ongoing throat-clearing, or is used to the general idea of throat-clearing, for example: jag är trött på harklandet ('I'm tired of the throat-clearing', with the implication that this is an ongoing issue.
Hennes röst var skrovlig så hon harklade sig
Her voice was gruff so she cleared her throat
Usch, jag måste harkla mig hela tiden
Yuck, I keep having to clear my throat