What is the difference between "Do it yourself" and "Do it by yourself"? and how and when can I use each one of them?
There can be a difference between yourself as opposed to by yourself in describing an action. To do something yourself is to take personal responsibility as opposed to leaving it with a third party. To do something by yourself is to do it alone, without the input or assistance of any companions. Sometimes they are interchangeable, but sometimes they are distinct.
Do it yourself is closely associated with making repairs and improvements to houses and automobiles without the aid of professionals, to the extent that do-it-yourself has entered the dictionary as an adjective (e.g. do-it-yourself project or do-it-yourself manual) and DIY is the name of a television network with shows about people who do their own construction and landscaping.
Consider the following exchanges:
The above simply means that Neighbor 2 will not hire contractors to paint the garage door, and will endeavor to do it himself. On the other hand,
In this case, Neighbor 2 not only is not going to hire contractors, but intends to do the painting exclusively himself, without the aid of others, which is likely to suit Neighbor 2's spouse and children just fine.
Do it yourself means just do it without the help of experts and also without the help of any guide, but you might take the help of a friend or anyone who is not professional. Do it by yourself means do it without the help of anyone, whether expert or not.