These annoying little words can easily be confused.
They may look much the same, and sound exactly the same, but they have different meanings and uses.
This word describes a relationship between things.
So you might say, 'It's a matter of law.' This means that whatever is being discussed is related to law, or belongs to the law.
We say, 'The Queen of England' because we are speaking of the relationship between the Queen and England. They are linked. The Queen belongs to England and England -- supposedly -- belongs to the Queen.
So -- the centre of town.
NOT 'the centre off town'.
This word is used when we are talking of things being separated or removed from each other, or of something being ended.
So we say, 'Take off your coat.' -- The coat is being removed from the person.
'She took the book off the shelf.' -- She removed the book from the shelf.
We can say, 'Turn off at the next junction.' That is, leave this road at the next junction.
Or, 'Switch off the computer.' That is, end your session on the computer.
Or we could say, 'The King's head was cut off.' The king's head was removed from his body.
So -- 'Take your feet off the table.'
NOT -- 'Take your feet of the table.'
If I may be allowed a little rant -- you NEVER need to say 'of off'. When you take your feet off the table, you remove your feet from the table. And that's it. That's all that needs to be said.
Your feet were never 'of' the table. The table may have its own feet, but yours never belonged to it, so to add 'of' is completely unnecessary. The phrase 'of off' is awkward, ugly and incorrect.