Take a cotton napkin, or a paper coffee filter, or a cotton tea towel, or a woven cotton shirt, or several layers of cheesecloth...you get the idea. Put the cloth in a strainer or colander standing in a bowl. Pour your yogurt into the cloth. Let stand in the refrigerator or loosely covered on the counter for 2-4 hours for Greek yogurt, or 8-12 hours for yogurt cheese* (known as labneh in the middle east). Transfer drained yogurt to a container and store in the refrigerator.
The drained liquid is whey, which can be used for cooking.
Don't have a colander? Pour your yogurt into a tea towel and tie the ends of the towel to hang off your kitchen sink tap. Put a bowl under it to catch the whey if you want to.
Yes, it is okay to leave yogurt out overnight at room temperature.
*If you are using yogurt cheese as a Phillydelphia-style cream cheese substitute, stir in ¼ tsp salt per cup of yogurt before draining.