How to paint trim?

I need some tips from experienced people about how to paint trim. I am about to paint my dining room and hallway (part hardwood floor, part carpeting) for the first time in 15 years (way overdue) and I want to make sure I do it right. I searched online for information and I am literally overwhelmed with TMI, so I decided to ask on Hometalk and find out what I actually need to know, before painting the trim. I am referring to the trim/molding/baseboard both by the floor and the ceiling, as well as around windows and doorways. What kind of paint, what to look out for, paint trim before or after walls and ceilings?, any special instructions, prep, etc...? Please share your knowledge and experience! Thank you!
q how to paint trim


Amanda
Amanda