Paint
Buy only what you need
Use what you buy
Donate what's left
As a last resort, dry it up and dispose with trash
Measuring the project to be painted prior to purchasing will help you buy as much as you need to finish the project, and keep enough for later touch ups. Buying a gallon on sale when you only need two quarts isn't such a bargain when you try to dispose of the leftovers.
Store leftovers for future projects and for touch ups. Find other projects that can use the same paint. Touch up other rooms, paint the dog house, put a fresh coat on the garage door,..........you get the idea.
If you've now exhausted all the possibilities in your home, what about your friends, family and neighbors? Could they use what you have left? Nonprofit agencies, community theatres, schools (for the drama club props), or local shelters are other possibilities. Habitat for Humanity's ReStore will take full gallons of usable latex paint for resale. Please do not take them contaminated or otherwise unusable paint that nobody will buy.
For small amounts (less than 1/4 of a can), open the can and set it aside out of reach of children or pets, in a well ventilated area. Stir occasionally to speed up the process. If that's too slow, you can paint it onto cardboard in layers and let it dry. For larger amounts (more than 1/4 a can), you can use absorbent material to dry out paint faster - kitty litter, sawdust, oil dry, shredded newspaper, even a commercially available paint hardener. One word of caution - if you have a full can, pour half into another container before adding the absorbent or you will end up with an overflowing mess. Latex paint will harden much faster than oil-based paint. Once the paint has hardened, put it in with your regular trash with the lid off so the hauler can see it is solid.
For aerosol cans of paint, spray onto cardboard until nothing more (even air) comes out of the can. Then dispose of the empty can and painted cardboard with your trash.