This is going to be a long one, sorry. The relationship between lifestyle/environment and evolution can be difficult to wrap your head around. I include two things to keep in mind when thinking about that relationship, and after the break I address the examples you include in your reply. I'm used to using certain vocabulary so if you don't get what something means, just point it out.
----
The distinction between what causes and what influences genetic mutation/evolution is important. I'm certainly not arguing that environment and lifestyle of a species doesn't influence evolution in some way. But there are two things to keep in mind.
[By the way, by environment I mean everything outside the organism: temperature, food sources, predators, parasites, biome (desert, forest, ocean, etc), intensity of sunlight, altitude, and basically anything else you can think of. These factors also influence an organism's lifestyle as well, but the environment is what typically determines lifestyle so that's the word I use.]
1) First, while there are many factors that influence the direction of evolution, the direct cause is still genetic mutation. The inherited information that makes the 'blueprint' for the next generation is contained in the sperm's DNA in its nucleus, and the egg's DNA in its nucleus and mitochondria. This is what is passed down. Other environmental/regulatory factors may influence how the fetus develops, but DNA is the hereditary material. What you get from the sperm and egg is... what you get. Generally evolution happens like this: mutation happens, if it gives the organism a reproductive or survival advantage then that organism will reproduce more, and given enough time the mutation will spread through the population because that organism's descendants will have an advantage over the rest of the population.
So if you see a sentence like "humans developed language because they needed to communicate better", that isn't entirely correct. On a large scale, our ancestors may have found advantages in being able to communicate better for hunting and living socially. But the direct cause of that ability is a set of two mutations in a region of the genome implicated in language, a transcription factor called FOXP2. These two mutations separate us from the other primates, and similar mutations are present in songbirds (known for their vocalization) and transgenic mice (if you make the same mutations in mice, they vocalize completely differently). Apparently these mutations were advantageous because natural selection favoured the individuals who had them, until those mutations became universal in the human species today.
Another example: you can think of many reasons why a bigger brain would be an advantage for us. But how was it possible in the first place? A recent study looked at human copy number variation (number of copies of each gene; higher number means that gene is more active and produces more of whatever it makes). The researchers found 53 gene families that are more active (higher copy number) in humans. The majority are tied to brain development. Genes are duplicated by accident; mutations are just mistakes the cells didn't catch, that's all. But if they give the organism an advantage in its particular environment, the mutations will stick around.
2) The second thing to keep in mind when talking about how environment influences evolution is something I've mentioned before: biological evolution takes place on a massive time scale. There simply isn't enough time for a mutation occuring in generation 1 to become more frequent in generation 2, unless you restrict yourself to looking at a single family. Examples might include heritable diseases like hemophilia, which are caused by genetic mutations and passed down from parent to child. But more often we look at evolution in terms of how entire populations change (not individuals), and that often takes centuries and thousands of years.
----
With respect to the examples you include (pigs, cattle, milk cows), we can apply knowledge of how evolution works to that as well. Pigs lost their hair like they changed in other ways, as a consequence of genetic changes they went under, because when humans liked one piglet more than another they save the one they like for breeding and eat the other without allowing it to have children. This is how, on average, domesticated species become more productive and easier to manage over long periods of time. When humans started raising cattle for beef, naturally they would feed them well, but they would also keep the best ones for breeding the next generation, the ones who were naturally more muscular than the others despite getting the same treatment, and humans would prevent the smaller/skinnier ones from mating and having babies. Fast forward to the present day and the cattle we have now are highly suited for beef production. The same would have happened with milk cows as well. There is natural variation within species since mutations happen to individuals, but selection is on the population level.
If I'm active and I do a lot of sports, that will not change the genetic material produced in my eggs. If I get pregnant, the developing fetus will not know if I'm an Olympic swimmer or if I only go for a run once a week. It will know chemicals, so I would avoid alcohol and drugs during that time since it's so much more vulnerable than I am (and these chemicals can actually access the fetus through the connected blood supply we both have). Neither will it know any cool biology facts when it's born even though I might end up getting a PhD and/or reading Wikipedia articles to it during the pregnancy.
In short, knowledge and traits acquired during an individual's lifetime do not affect the heritable material upon which evolution depends. If these traits influence which individuals are able to reproduce, there may be a change in the overall genetic makeup of the population over long periods of time, but that is not guaranteed.