When I was an American university student, I always began the letter like this:
Dear Professor __________,
The actual rank of the professor does not matter. In fact, if you are talking to an assistant professor or even a lecturer, then that person will feel happy that you are using a loftier title.
Dear Instructor __________,
This is also acceptable. "Instructor" is a generic term for any kind of teacher in an university.
Usually, university professors have a doctorate degree or some kind of post-graduate education. So, you can also use this:
Dear Dr. __________,
NEVER begin your letter like this:
In American primary schools and secondary schools, students may refer to their teacher by one of those titles and the surname, because primary and secondary school teachers only have a Bachelor's or Master's degree, not a Doctorate degree.
The body of the letter should contain whatever you want to say. Use a formal tone. Be extremely polite. You may want to use your professor for a recommendation letter or letter of reference someday.
The closing may be:
[YOUR NAME HERE]
[YOUR CONTACT INFO HERE]