The Melodic minor Key
The Melodic Minor scale is a blend of major and minor. Of course, it’s primarily minor, as it includes the minor third (b3). However, unlike the Natural Minor scale, it has a major sixth (6) and a major seventh (7).
Modes / Scales
The scale often used by jazz musicians, for example, is the 7th degree in Melodic Minor -> Altered or Super Locrian.
The Altered scale can be played over any “functioning Dominant Chord”. A functioning Dominant is a chord only if the Dominant chord (V7) resolves to the first degree (tonic).
The intervals of the Altered scale can be seen in different ways. On the one hand as: 1 b2 b3 b4 b5 b6 b7 or as: 1 b2 #2 3 b5 #5 b7.
If you have a chord like Calt in a jazz standard, it means that you can choose one of the altered notes (b2, #2 and b5, #5) yourself. Of course, you should always listen to the vocal or solo melody first and foremost. If the singer sings a #2 and you play a b2, it can sound wrong, even though you are theoretically doing everything right.
Cheatsheet
You can download a cheatsheet with the notes, chords, and diagrams here.