They seem so innocent until they are blocking your vision....beware of your car's sunvisors.
It is pretty straight forward to repair or replace a sun visor. If your sun visor is not staying up, but nothing is broken, a really quick fix would be to put a piece of tape around the end that clips in. Often, the receiving part of the clip stretches over time so there is not enough friction to hold it up.
You can also replace the receiving clip, these are generally around 5 dollars and can be found at the retail parts counter of your respective auto brand dealership.
If the sun visor is loose, often you just need to tighten the screws holding the main visor in. These are usually a torx bit so you will need to borrow or purchase a special tool to tighten them.
If all of this is outside your spectrum, make sure to check with your mechanic the next time you go in for regular maintenance. It's important to be able to see while driving. Both so that your vision isn't impeded and also so you can block out the harmful sun while driving toward it.
Below is a video on how to replace the receiving clip on Hondas and Toyotas. Let me know if you have any questions!