Roman numerals are named based on the scale degree they're built on. An upper case Roman numeral means the chord is major. A lowercase roman numeral means it is minor. Roman numerals with an 'o' superscript are diminished.
In minor, the V and viiº use the raised 7th degree.
Figured bass is used to indicate what member of the chord is in the bass.
If the Root is in the bass: There is no figure on the Roman numeral (e.g. just I)
If the 3rd is in the bass: Add a "6" to the Roman numerals
If the 5th is in the bass: Add a 6 and 4 to the Roman numeral
When you add a 7th to the Roman numerals above, you get the following 7th chords:
M7 = Major 7th (Major triad + M7th)
Mm7 = Dominant 7th chord (Major triad + m7th)
mm7 = Minor 7th (minor triad + m7th)
hd7 = Half-Diminished 7th (diminished triad + m7th)
dd7 = fully diminished 7th (diminished triad + d7th)
* Note that the only Mm7 chord is the 7th chord built on 5.