Somewhat is an adverb and it means “to some extent” or to a degree
I was not angry but I was somewhat upset
From this you can see that I was not completely angry but I was not happy either.
His story was somewhat misleading
The company directors new car was somewhat longer than his old car.
This is a vulgar slang word and is dangerous to use unless you are completely confident with the English language.
The reason it is a dangerous slang word is because it comes from the base word bugger which is a sodomite (check sodomite in the dictionary if you don’t know it).
While the word may be used in UK English street slang as in the examples you quote:
Your buggered = Your in big trouble
You lazy bugger = a very rude way to call someone lazy.
I would strongly suggest anyone learning English never to use this phrase.
Student or Learner