From the BBC:
The t-word, which comes from an Old Norse word for cut or slit. Pronounced to rhyme with 'hat', or, in some regions, 'pot', it is widely used in the UK as a slightly more expressive form of 'twit' or 'idiot', and it seems likely that many of the people using it do not know what it means, or at least choose not to think about it. They are in good company. Robert Browning clearly didn't when he wrote the following lines in Pippa Passes:
"Then owls and bats
Cowls and twats
Monks and nuns in a cloister's moods,
Adjourn to the oak-stump pantry."
However it is probable that he was misled by a poem printed around 1660 when that well known and scurrilous poet Anon stated:
"They talked of his having a Cardinal's Hat,
They'd send him as soon an Old Nun's Twat."
Which appears to be why Browning thought it meant a piece of nun's clothing, specifically a wimple; and is a clear lesson to us all to check words we don't understand in a dictionary, and not to infer meaning from context.