When you're learning a new skill, chances are a lot of it will come easily at first. Then you'll hit a wall, where nothing seems to be working and no matter how hard you try you just can't get it right. Don't panic!
When you hit a plateau in your learning process, it's normal to feel frustrated. Think of this phase as a sign that you're "levelling up"! Eventually you'll master the concept that had you stuck, and you'll progress again in leaps and bounds. Until the next plateau!
During those periods of frustration, don't be afraid to take a step back.
Google it, take steps to troubleshoot on your own, and ask for help from friends and mentors. But sometimes the best thing to do is walk away.
Work on something else for a day or two, then return to the problem with a clear mind. A lot of the time, the solution will present itself!