A quick summary of the action up until this point will put things into perspective. Jacob has been working for Laban for a long time now. He initially agreed to work for Laban for 7 years so that he could marry Rachel. After Laban tricked him and gave him Leah instead, Jacob agreed to work another 7 years so that he could marry Rachel also. In addition, he has now spent some time having children with his wives. At minimum he has been working for Laban for 14 years, but it could be a bit longer. Jacob approaches Laban and asks if he can depart, however Laban won't have it. He keeps trying to get Jacob to stay by asking him to name his wages. Jacob finally decides a way to try and get Laban to agree. Jacob offers to keep Laban's goats for what appears to be one final generation of offspring. When the generation is up, all of the goats that are less desirable - striped, speckled, and spotted will be Jacob's. Laban's will be the rest. Laban sees an opportunity he can't refuse and he accepts.
As if Jacob didn't lay a good enough deal for Laban, Laban goes out of his way to remove every striped, speckled, or spotted goat among his flock. This would make it much more unlikely that goats with those traits would be reproduced at all. It is at this point that Jacob turns to employ a little trick that he has learned in his time pasturing Laban's flocks.
Evidently, there was a belief by Jacob that whatever the animals were looking at when they mated, their offspring would share similar traits. It is likely this view was held by more than just Jacob himself. Due to this belief, we get the account that Jacob tried to put sticks that he had made striped, speckled, and spotted before the strong goats when they were mating. He was hoping to ensure that the best of the goats would end up as his possessions when the cycle was up. Please be aware that the deck was quite stacked against him, as Laban had attempted to trick him entirely.
There is much speculation at this point about Jacob's practices. Was he trying to employ some sort of dark magic or sorcery? Was he not trusting in the Lord fully to deliver him? The context seems to indicate that this was simply a husbandry "trick" that he had learned, not some sort of magic. It is to the relationship of man's effort and God's working that I would now like to turn.
Trusting in God and believing that God will provide for us and look after us does not relieve us of human responsibility and effort. There is an old joke that demonstrates this point well.
There was a great flood that devastated a city in which a faithful pastor was living. He escaped the devastation by climbing onto to his roof, but the waters were still rising quickly. He was not worried however, he knew God would deliver him.
A few men in a life raft happened to float by his house and see the man. "Come aboard Pastor, we have room for you!" they called. "No friends, the Lord will provide." he responded, and they shrugged their shoulders and paddled away.
A few hours later, the Pastor had moved to the highest part of his roof, when a speedboat came by. "Hop in, friend" they called to the minister. "No worries friends, the Lord will provide." They headed away also.
Finally, the waters had risen so high that the Pastor was isolated to a small patch at the highest point of his house. At that time a low flying helicopter looking for survivors spotted him and flew down to pick him up. He refused to get on the helicopter and insisted to the men that the Lord would provide. The helicopter flew off to look for more willing survivors. Finally the flood waters rose so high that the Pastor was swept away and he drowned.
When he found himself dead and in heaven, he approached God and asked him: "Why didn't you save me?" God looked at him incredulously: "I tried three times!"
It is the same here with Jacob. He is trusting in the Lord to provide for his needs. He isn't practicing some sorcery or wizardry. He is simply attempting through the best means he knows of to try and work hard to ensure that he can beat Laban at his own game. It does not matter one whit that his means are entirely flawed or useless, and the text doesn't indicate that the manipulation with the sticks was a contributor to the actual production of the offspring in this way. Despite his flawed method, God chose to bless him, and ultimately in the next chapter, Jacob will attribute any success he has to God.
This is a crucial truth to keep in mind for our own lives. Often, we are directed by Scripture to put our trust in the Lord, and he will provide for our needs. However, this does not at all mean that our task is to stay holed up in our homes praying all day. Rather, we are to certainly pray, but after we have done so, we are to go out into the world and through the efforts of "working as unto the Lord" seek to accomplish the things that we have prayed for. It is through faithful obedience to him and a heart that is set upon obedience to God that the Lord will often provide for his people.