'Fare' is a verb here. In this context, it means 'travel', or simply 'be'. 'Weel' is a Scots pronunciation of 'well'.
So when you took your leave of someone, you might say 'Fare thee well', meaning 'travel well' or 'be well'. This would be equivalent to the modern 'Have a good trip', 'Have a safe journey', 'Take care', 'Look after yourself' and so on.
The shortened version 'farewell' , meaning 'goodbye', still exists in modern English, of course. It is no longer used in greetings, but can be used in compounds such as 'farewell concert' or 'farewell party'.