A very simple answer -
'But' joins two sentences into one sentence:
"I love you, but I can't marry you."
'However" shows that a sentence is in contrast to the previous sentence:
"I love you. However, I cannot marry you."
There are other usages of both words, but I think those are the most common.
or
There are other usages of both words. However, I think those are the most common.