I literally don't know how to. Assuming I meet her at a party and then at the end I wanna ask her, do I just say "hey I'm about to head out (or if she says she's about to head out) but i thought I'd ask would you wanna go and get coffee together sometime?"
Like is that line okay?
And what if she says "sorry I don't drink coffee?" Not even like I'm not interested but that specific answer.
Yeah, when you're leaving or something, say "hey, would you want to get coffee sometime?" Then she'll probably say something along the lines of, "okay. When?" or "okay, text/call me." Then you'll say, "alright, sounds good. See you then." or something like that.
Or she'll just say "no" which is pretty self-explanatory.
Are you just asking some random girl or someone you know? If you actually know her then it's probably best to start at getting a way to communicate with her outside a party rather than just asking her to go on a coffee date out of the blue.
Yeah that line sounds fine. If she doesn't drink coffee then suggest something else. Tea shop, bakery, (also remember that cafes also serve other drinks), etc. I've asked guys out for coffee before and that line sounds fine to me