The basics are easy. Figure out what you want to do. Find a charity that will accept the thing you want to make. Get the finished thing to them.
Now that I have put on my captain obvious hat, I will take it off and give some not so obvious points.
No perfumes or smoking. Many people are allergic to or highly sensitive to smells. These two can cause nausea or vomiting or worse can close off the airway of the very person you are trying to help. How can you prevent harm?
First, wash your hands. Seems obvious but it isn't. You want to start with least amount of smell as you can.
Second, if you are a smoker in the house don't store your yarn in the house. It will absorb the odor. This will also mean you have to work on the thing outside the house and store the partially made thing where the yarn is kept.
Third, don't store the yarn in the attic or cellar and definitely don't put dryer sheets in with the yarn. Attics and cellars can have their own unique smells and worse can be a haven for mold or mildew or rodents or bugs. These things can cause a lot of harm to people who are in physical illness or are homeless.
Check your chosen charity's website for particulars. You are going to want to know if you have a restriction on fiber type, if you have to use new yarn or can recycle yarn, if there's a specific pattern to use, specific sizes allowed. All these parameters are for a reason.
Most charities will not accept wool. So many people have discovered sensitivity or outright allergies to wool. It also is not usually a toss in the washer and dryer fiber. Some, like the knitted knockers, require specific brands of yarn and fiber because the area of use is extremely sensitive. The yarns they specify are the least irritating and most comfortable while giving women what they need.
Some of us are in financial hardship but still want to help. So unraveling sweaters and afghans give a way to get a lot of yarn for not a lot of money. However, no one except the donor, knows what the blanket or sweater was exposed to before we bought it. These are recycled yarns and not usually acceptable. Check your chosen charity for guidance.
Many charities have requirements for finished sizes and won't accept any other. Many times this is for ease of joining. Having every thing the exact size means someone else can zip through the joining. For those who say it's good enough, your contribution may well be tossed in the garbage. For those who say the charity can send your unusable contribution to someone else that will be able to use it, no they won't. They don't have a running list of what charity accepts what. Even the internet can't do that. One organization has made a small dent in this, career. Even they recognize that changes occur and they can't keep up.
Specific patterns might be requested because that is what they need. Baby blankets may need to be solid rather than have holes because little fingers and hands can get caught up in the holes and, if not caught quickly, can cause loss of circulation or the need for amputation.
Some charities request each donation be presented in a zippered plastic bag. This helps keep the donation clean and contaminate free.
So follow the rules for your chosen charity or find a charity that aligns with your way of doing things. They are grateful for the items donated that follow the rules they have.
Resources for the charities mentioned