If you are satisfied to be an "adequate" programmer, just borrowing or hacking until you get something that works is good enough. If you want to be a great programmer, you need to understand the concepts. Learn the big picture. Learn how all the pieces fit together to make the big picture.
Here's a little anecdote that sums up my advice: When Windows came out, I had to make the switch from command-line programming to GUI programming. So I took a class and got some books and was able to copy-and-edit from examples and get something that worked, but I didn't really understand it. So finally one day I said, I'm going to learn how this really works. So I brought up a blank screen and tried to write a simple GUI program from scratch, without consulting any references or examples. Of course my first try didn't work at all. So I tinkered with it and hacked away until I fixed the first problem. Of course it then failed with a different error. So I worked on that. Etc. At a few points I looked back at an example to see how mine was different. Ah, I said, I see, I failed to do such-and-such. But I just fixed one thing from an example each time. By the time I finally had a working program, I had something that closely resembled the examples I had been using. But now I knew what every line of code did and why it was there.
So that's my advice. Every now and then, take the time to step back and write something from scratch. No book, no Google, nothing. Make it a rule for yourself that if it doesn't work, you will only consult a reference or example to fix one problem at a time, and you will study it until you understand why that fixes the problem. Then when you're done you'll understand it.
Anybody can write a great work of literature if copying Shakespeare word-for-word counts as "writing". The trick is when you can do it yourself with just a blank sheet of paper and a pen.