Programming is nothing more than talking to a computer.
Problem is, the computer is not as smart as we are and doesn't have the vocabulary of a human. To make the computer understand, we explain concepts by describing what they look like (data structures), what they do (functions) and how it changes the world (state) in a language the computer understands. A programming language.
While it's not hard to comminucate, doing it effectively is a skill of it's own. This is no different for programmers. We make mistakes, explain things incorrectly or expect something different to happen. Take it easy, don't give up, read your source code calmly and ask for help if you can't solve the issue on your own.