ma'am is madam...my lady...meaning someone you respect as a lady.

miss is commonly used as a title to address a woman who isn't married, regardless of age.