Does illegal downloading or viewing of copyright material violate the second precept? As a kid I used to download a lot of softwares and movies using torrents. Even if something  illegal is done, it doesn't necessarily mean that it violates a precept. But can this be considered as stealing in Buddhism?
How can this be explained according to the Buddhist view?
No, it does not. In order to steal, something has to be misappropriated from the original owner.
Copying is not theft, even according to modern jurisprudence; copyright is an artificial &quot;right&quot; granted to the &quot;owner&quot; of a specific intellectual activity to prevent the &quot;copying&quot; of the product of said intellectual activity. &quot;Intellectual property&quot; is likewise an artificial construct.
The presumption that someone has a right to restrict the copying of their ideas is suspect at best, but it should not be confused with the right to restrict the use or appropriation of one's physical property, since the latter involves singular, rather than identical, entities. You don't call it stealing if someone breaks into your house, copies down the way you set your table and goes and does it the same in their own home.
It is important to understand as well that the question of whether copyright infringement is unethical hinges not on whether the owner doesn't want you to copy, but on whether they have a right to forbid you to copy. It is not unethical doing something just because you know someone else doesn't want you to do it; otherwise I shouldn't have become a Buddhist.
The misunderstanding comes from our acceptance of copyright as a tool for monetary gain. We have come to accept that because certain people want to be able to market their ideas, they therefore have a right to do so, whereas it was previously understood that only one's potential at coming up with good ideas (i.e. their value as a person) was marketable. It is not the case that just because someone wants to be able to make money through a certain means therefore they have a right to society's protection in so doing; otherwise, pushing rocks up a hill would have to be paid proportionately.
The main reason we tend to think that copyright is an actual right stems from the massive propaganda machine of the entertainment industry (and mara, I assume) that has managed to equate people who copy the ideas of others with bloodthirsty sea-faring mercenaries (a.k.a. pirates).
Furthermore, though it's now outside of the realm of your question, a person's insistence on controlling copyright may be arguably considered unethical from a Buddhist standpoint; it can be seen as selfish (since it costs nothing to allow others to copy one's ideas), invasive (since it is not really any of your business), and hypocritical (since everyone copies just about everything they come in contact with throughout their lives from the time that they're born). Again, just because we want to be able to make a living in a certain way, doesn't mean we should be protected in it. Theft, on the other hand, does cost the owner, is the owner's business, and expecting protection against it isn't necessarily hypocritical.
tl;dr: copying without permission and theft are two different concepts; whether copying without permission can be considered immoral is suspect at best, but at any rate is not directly related to the second precept.
Q&amp;A
Doesn't the second precept deal with more than just misappropriation?
No, like all the precepts, it really only means what it says. Anyway, if it was interpreted more broadly, where would you draw the line? Copying someone's words without their permission is stealing, but distributing pictures of them without their permission isn't? Or distributing pictures of them is, but looking at them isn't? There is no clear definition available, except the clearly bogus one of &quot;not doing what other people don't want you to do&quot;.
Isn't intellectual property the same as real property?
First, let's get one thing straight; copyright infringement isn't theft; the law doesn't look at it as theft, the RIAA doesn't look at it as theft, no one considers it to be theft except the public who have been misinformed as a part of ongoing propaganda that it is a kind of theft (or piracy, which is really silly). It is actually more like a kind of breach of contract. To explain: the law doesn't concern itself with the physical entity that houses the information; it concerns itself with the fact that something has been copied against the wishes of the copyright holder. The issue isn't that a new copy exists, it is that a copy has been made. It is the act of copying that is illegal.
But the question remains, whether the person who has put all the work into creating a piece of intellectual property doesn't have the same rights as a person who puts work into a physical creation. The thing is, intellectual property isn't like other property in that it can't be given, sold, bought, etc. It can only ever be copied. When you tell someone a secret, you have created a copy of the information. When you publish a book, you are not selling the book, you are selling the right to a copy of the information it contains. So when a person makes money off of intellectual property, what they are actually selling (and this is how the industry really understands it, afaics) is a license; you can't actually sell information. So when concerning ourselves with the poor victims of intellectual property theft, what we should ask is &quot;what gives someone the right to license their ideas?&quot;
The difference is driven home when you consider that a person who creates a physical item of value is able to sell it once. They are only able to sell it because someone else wants to own it; if there are cheaper versions elsewhere (patent and copyright laws notwithstanding), their customers are free to go elsewhere.
A person who holds a copyright over information, on the other hand, holds their creation hostage, pimping it out repeatedly and ever retaining sole ownership over it. They do no extra work for each payment obtained and can, in cases where demand for the information is high, expect to receive payment massively disproportionate to the original work performed to obtain the information (which, incidentally, most likely involved copying information from others).
In short, the real question should be, &quot;what exactly do real property and intellectually property have in common?&quot; The answer is: &quot;not much.&quot;
Isn't copyright infringement breach of promise?
In cases where you promise a sentient being of something and then break that promise, yes. Clicking on an EULA isn't a promise because you are communicating with a machine. When you buy a book, if you clearly communicate that you promise to use it in a certain way, then yes, you would be breaking your word if you used it in a different way. If you download software from the Internet, you make no such promise at any point.
Isn't it a cause for mental defilement to go against the wishes of the copyright holder?
Potentially; the situation is that you are being requested not to do something that is otherwise within your rights to do by the owner of the copyrighted work.
You have to weigh whether that request holds merit or not. If your friend asks you not to performing some action, you have to ask yourself whether performing said action is important enough to upset your friend, keeping in mind there is nothing unethical about performing said action. There is nothing unethical about copying other people's work without their permission (assuming, of course, that you properly attribute the works to the correct author and don't try to take credit for other people's work); there is something potentially problematic about upsetting people, especially friends. By the Buddha's words, we can see that upsetting others should be done carefully, but is not necessarily outside of what is wholesome.
As to whether wanton downloading of entertainment is a cause for mental defilement, I don't really think that has anything to do with the argument at hand, since it has nothing to do intrinsically with the matter of permission to do so.
Doesn't copyright infringement hurt a valid industry/artist?
Anyone who thinks this should really brush up on their history of &quot;intellectual property&quot;. Specifically, I recommend reading anything by Cory Doctorow, Lawrence Lessig, or Richard Stallman. At the very least this would give a look at the other side of the propaganda war waged by the entertainment industry. Honestly, a lot of what these guys say sounds more Buddhist than some of the opinions of the card-carrying.
As I've said above more than once, though, those people dependent on copyright to make a living (really this is only the entertainment industry bigwigs; the majority of content creators could do better if they adopted a more crowd-friendly approach like Cory Doctorow) are suffering from the same problem scribes had when the printing press was created; they were expecting to be rewarded by a system that was no longer necessary to society. Thoreau put it best when he said:

Not long since, a strolling Indian went to sell baskets at the house
of a well-known lawyer in my neighborhood. &quot;Do you wish to buy any
baskets?&quot; he asked. &quot;No, we do not want any,&quot; was the reply. &quot;What!&quot;
exclaimed the Indian as he went out the gate, &quot;do you mean to starve
us?&quot; Having seen his industrious white neighbors so well off- that the
lawyer had only to weave arguments, and, by some magic, wealth and
standing followed- he had said to himself: I will go into business; I
will weave baskets; it is a thing which I can do. Thinking that when
he had made the baskets he would have done his part, and then it would
be the white man's to buy them. He had not discovered that it was
necessary for him to make it worth the other's while to buy them, or
at least make him think that it was so, or to make something else
which it would be worth his while to buy. I too had woven a kind of
basket of a delicate texture, but I had not made it worth any one's
while to buy them. Yet not the less, in my case, did I think it worth
my while to weave them, and instead of studying how to make it worth
men's while to buy my baskets, I studied rather how to avoid the
necessity of selling them. The life which men praise and regard as
successful is but one kind. Why should we exaggerate any one kind at
the expense of the others?
Walden, Ch. 1

It's okay to make baskets, but to force people to buy them when other means present themselves is silly. If your reason for doing something is to make money, then the onus is on you, first and foremost, to ensure that your product is valuable; copyright is just an artificial means of placing a monetary value on something (information) one cannot otherwise.
But the question remains, whether we would lose valuable content if there were no copyright laws. The answer depends on what you understand as &quot;valuable&quot;. If, by valuable, you mean &quot;marketable&quot;, then of course the answer is yes, we would lose a lot of marketable content. We would also lose a lot of addictive content, since the logical outcome of encouraging and protecting monetary gain through copyright ownership is content that is primarily designed to encourage demand (i.e. addictive). The entertainment industry would stop stooping to the lowest common denominators of sex, violence, and absurdity in bringing pleasure to others. I for one could live without that.
If information were free, as it really should be, there would be no powerful incentive to encourage addiction to intellectual property; there would be a reversion to the days when, at worst, one propagated information as a means of promoting one's own value as an individual. Maybe people would stop writing books and making movies on film, but really, haven't we shown already with YouTube and the Internet that these are outdated mediums? It doesn't really cost millions of dollars to create any more.