Learn the basic Chess Rules first to understand how to move the chess pieces. Chess is the greatest game on earth, you just don't know it yet.
Answer: Don't think too complicated in chess. It is a straightforward game. If your king is in check, you have to get the king out of check first, of course, before you do anything else.
If it is your turn and you touch one of your pieces then you must move it, if it can be legally moved.
If your hand has not placed the piece on a new square completely you can place it on any other legal square.
If you touch one of your opponent's pieces then you must capture that piece if it can be captured. If the touched piece can not be captured there is no penalty.
I advice you when you have touched one of your pieces always move the touched piece. Even if you just play a friendly game in the park. Nothing annoys a real chess player more, than if the opponent touches a piece, holds it in his hand, then puts it down and moves something else.
This is because your mind is calculating the position permanently and when a piece is lifted the position changes immediately and your mind starts calculating the expected move. And when the move is not executed because the opponent puts the piece back and moves something else instead then this breaks your mental calculations.
If a move is executed it cannot be taken back. Never allow yourself or others to take moves back. This is bad discipline and in the end you are the loser.
If your opponent has blundered his queen and you allow him to take back the move and move something else, then where does this end.
Next time you are asking to take a move back in return, he might not allow it, because he found a great move and wants to win. Then you get really upset and the argument starts. Take pride in your game and don't be a whimp. Chess is a hard game. If you have made a big mistake and lost the queen, then give up and start a new game.
Now you finally made it, you know the basic chess rules now. It's time for you to go further and learn more...Now read the Answers to these Beginner Questions and this will clarify a lot.