I have a learning disability where I can only learn through seeing (not seeing and hearing). As a result, I need to have headphones in class to block all sound. Should I just tell the professor this?
It would not consider the request rude, as long as you have a reasonable justification for needing to wear headphones during class (which you do). How you might approach your professor and whether he'll accommodate your request may depend on where you're located and whether your jurisdiction provides protections for individuals with disabilities.
In the United States, for example, individuals with disabilities are protected though the Americans with Disabilities Act (ADA), which require colleges and universities (amongst other organizations) to provide reasonable accommodations for individuals with disabilities—in your case, needing to wear headphones in class would be considered a reasonable accommodation (although this might depend on the subject of the course—in a woodworking course where headphones would pose a threat to safety, for example, it would likely not be a reasonable accommodation).
There are also proper channels a student needs to go through to request medical accommodations—initial requests should not go directly to the professor. Universities and colleges will have a centralized student disabilities office that handles requests for disability accommodations and it is this office that will require documentation of a disability and determine what accommodations a professor will be required to provide. They will then send a form to your professors indicating what accommodations they need to give you. Because of ADA and health privacy laws, the disability office will not tell your professor what your disability is and your professor is not allowed to ask you what your disability is.
Although this answer is very much local to the United States, similar protections may exist in other countries as well. Rather than approaching your professors directly, consider asking your university's student advising office, student life office or health clinic whether professors will provide accommodations for disability (you shouldn't need to tell them what your disability is). They will then be able to point you to resources that will work with you to find solutions.
If you are in the United States, I would suggest you identify the office on your campus that services students with disabilities. That office can formally write you an accommodation for your disability, which you can share with your professors. By law, professors must follow the accommodations that have been created for you by the office on your campus that services students with disabilities. You do not have disclose your disability to your professors, but you do need to provide them with documentation.
I believe the request certainly isn't rude - I'd almost consider it your responsiblity to let teaching staff know the best way for you learn. How much effort the teaching staff put into servicing the request is dependent on the policies in place at your own institution.
Where I work, we'd co-ordinate with the educational support office, who would have met with you in the first instances, worked at the best process, and come to us with some recommendations (so they are looking after things like assessments and reports and the like).
To be honest, I have a student who has not reported any ADA-qualifying issue who requested (and got) permission from me to wear gun-range over-ear noise-blockers during exams (we're both very Southern, so all clichés aside, it's easy for both of us to tell that these cheap cans are not in any way specially augmented in a secretive way). I don't see that self-creating a silent zone is in any way inappropriate, it isn't disturbing others, and she made the issue far easier to deal with than she would have had she actually decided to pursue the matter as a potential ADA issue.
But yes, if you feel that an accommodation might help ameliorate your federally protected condition, then by all means, pursue it!
Its not rude to ask and that is supported by the previous answers .If you are at a real university that has real exams that have candidate numbers on them and are moderated by lecturers at different universities then when you pass a paper you are just as good or just as bad as anybody else .I had a tutor to help me when I was repeating a course that I specialised in repeating .Over 20 years later when my tutor became a senior lecturer I let news of my learning disability slip .I passed and thought that If I had told the UNI would have things been any different .I dont think so because why should they make allowances for me .