The concept of yinyang has a long history. There are many written records about yinyang, which can be dated back to the Yin Dynasty (about 1400 - 1100 BC) and the Western Zhou Dynasty (1100 - 771 BC). Yinyang is the basis of Zhouyi (Book of Changes), the jing part of which was written during the Western Zhou. Yinyang became popular during the Spring and Autumn Period (770 - 476 BC) and the Warring States (475 - 221 BC).
The principles of yinyang are an important part of Huangdi Neijing (Yellow Emperor's Classic of Medicine), the earliest Chinese medical book, written about 2,000 years ago. They are still important in traditional Chinese medicine and fengshui today.
Here is a summary of the characteristics of yinyang. Yin and yang are opposite in nature, but they are part of nature, they rely on each other, and they can't exist without each other. The balance of yin and yang is important. If yin is stronger, yang will be weaker, and vice versa. Yin and yang can interchange under certain conditions so they are usually not yin and yang alone. In other words, yin can contain certain part of yang and yang can have some component of yin. It is believed that yinyang exists in everything.