Ok cool, anyways. It's usually better without the comma, as to show whoever you're talking to clearly does not care about what you just said and would like to move on or tell you about why they're angry with you, or the weird dream they had last night. If someone says this to you, they might be a bit ignorant or just in a rush.
Person 1: Hey did you hear about {this or that}?!
Person 2: Yeah whatever Person 1: Isn't it crazy?!
Person 2: Yeah ok cool anyways
You use it when You are uninterested in what someone has to say, but You want to seem interested in it. Or when You dont know how to reply to something and want to change the topic