Coming is from the viewpoint of the destination.
You might say to your colleagues "I'm going home" then phone your partner and, if they are already there, say "I'm coming home".
While you are home you might say "I came home", though you could also say "I went home" positioning your speech relative to where you were at the time you set out on your journey.
In the imperative, you can ask someone to come to where you currently are, "please come home". You can use either come in terms of where you will also be later, "come to the club with me", though you can also use go to ask them to join you in your act of going, "go to the club with me".