Shoyu is the Japanese version of soy sauce. Historically, the sauce was called hishio and was made by fermenting salt with either animal or vegetable protein (frequently fish). Later the salt was fermented with rice, wheat, and/or beans and made into miso. The residual liquid gathered from the miso-making process became shoyu.
Today shoyu is made from soybeans, wheat, and a culture called koji, then salt and water is added and the mixture is allowed to ferment for about a year. Less expensive mass produced brands use a chemical process to ferment the mixture in a much shorter period of time providing a less flavorful, but very salty product.
There are two types of shoyu, light (usukuchi) and dark (koikuchi). The lighter color sauce is actually saltier than the darker version. There are many different qualities of shoyu and prices is typically a good guide to finding a good grade of shoyu. Additionally you can find shiro shoyu which is know as white shoyu. See more about this product below.
Tamari is a type of shoyu made without wheat so it is gluten-free. Most all of the commercial versions use preservatives but you can find some of the high-quality sauce that is preservative-free.
The best place to find good shoyu is a Japanese grocery store. There will typically be many different brands and quality products to choose from. The mass produced brands you find in your local grocery store don't do the sauce justice. If you don't have a Japanese store in your area then you can buy shoyu online in specialty shops. Even Amazon.com carries some very good brands including: Kishibori Shoyu which is free of preservatives and is fermented in the traditional fashion for 1 full year.
metric conversions →
Technically the sauce will keep almost indefinitely but it you're buying "the good stuff", try to use within about 3 months as the flavor diminishes over time.
When you using shoyu in a cooked dish, it is best to add it towards the end of the cooking process to avoid giving the dish a dark color. This does not apply to dishes which are simmered for a long period of time.
Shiro Shoy is also known as white shoyu. Although it is not "white or clear" it is significantly lighter in color than regular shoyu. Shiro shoyu is made with the same ingredients but uses 80% wheat and 20% soybeans. Additionally the fermentation process is only about 3 months rather than 12. The resulting sauce has a more mild, sweet flavor and is much lighter color. The overall salt content is about 17% (which may vary per brand).
You probably won't find this in your local grocery store but look for it in a well-stocked Japanese market. You can also purchase it online at Amazon.com: Takuko White Shoyu.