
Anyway is an adverb that can also mean “in any case”, “in spite of reasons already mentioned”, “at any rate”, or “regardless”. Use these alternative phrases if trying to express yourself more formally.
Example:
I wasn’t sure the approach would work, but I asked my boss, anyway.
We’ve also seen this word being used in a rude manner. If someone is talking and someone else either cuts them off or waits for them to finish and then says “anyway” before changing the subject, it might be perceived as rude, especially depending on the tone used. It can also be used to continue an interrupted story.
Any way is an adjective-noun phrase that means “whichever path” or “In any manner”.
Example:
While I was teaching in Korea, I tried any way possible to get the students to enjoy learning and reading English.
More:
A note about “anyways”. It means anyway, but it's definitely non-standard. It’s accepted in informal speech, but please refrain from using it in writing, unless want to sound informal. Personally, I would delete this word from your brain.