With whom are you going to the park?
This one is correct. The question is asking about a person who has to be an object in your answer structure.
Suppose you are going with your brother whose name is Andy, for example. So you respond in the following form:
I'm going to the park with Andy.
I'm going to the park with my brother.
I'm going to the park with him. (Andy has to be near you that you can point to him as you reply.)
Who are you going to the park with?
This one is also correct. The question is asking about a person who has to be a subject in your answer structure.
Applying the previous example, your response should be in the following form:
Andy is the one/person I'm going with.
My brother is the one/person I'm going with.
But we can use the subjective pronoun "He".
He is the one/person I'm going with. (Again, Andy has to be near you that you can point to him as you reply.)
NOTE: There are many other forms that Andy can take in your answer whether he was the subject or object. I mentioned three ways for each one as your question is not about that specific issue.
— This note comes from Bob. He wanted to give it to you.
— Excuse me. I didn't hear the name. You said the note comes from who/whom?
As there is a preposition before the Wh-question, the answer would come after the same proposition like this: I said the note came from Bob.
"Bob" is the object of the proposition so he is neither the subject nor the object of the answer or question. Thus, it doesn't matter here which to use of who and whom.