Many students find these books helpful:
https://www.amazon.com/dp/0521675995/?tag=pfamazon01-20
https://www.amazon.com/dp/0471680583/?tag=pfamazon01-20
Judging by the contents of your course, you may also find the following helpful:
https://www.amazon.com/dp/0131481010/?tag=pfamazon01-20
Like others have said, it's all about practice. Practice, practice, practice. Most of us felt hopelessly lost when we first encountered rigorous proofs. I know I did. Proofs are very different from anything you’ve done before— it’s a new way of thinking. So don't stress too much. Know that if you put in enough effort you WILL understand it eventually. The hard work comes first.
One must first understand the mechanics of logic and set theory. For me the two are inseparable, and you cannot artificially treat them separately, as I was taught, and as I see done in many books. It is not enough to know the methods of proof and dis-proof, you need to understand
why they are so (and note the particular definitions, e.g. of how the connective ‘or’ is defined— not how we usually use the word…). I found Venn diagrams to cast a light on the dark landscape of proofs. For example, in understanding direct proofs: If you want to prove A implies B, then this is quite the same thing as proving ‘A is a subset of B’, in a sketchy manner of speaking. Draw the Venn diagram with A a subset of B. If you are ‘in A’ then you are ‘in B’. That is proving A implies B. Well now the other proof techniques follow easily from this idea. Contra-positive? Easy! If ‘A is a subset of B’ (you are required to prove A implies B) then if you are ‘outside B’ then you must be ‘outside A’—that’s a contra-positive proof! (I’m sorry if this is all blindingly obvious to you, and I come across as patronising; I apologise. When I was taught proofs we were never given any visualisations of this sort, even though it makes complete sense. I discovered this for myself a year or two later.). This Venn diagram stuff can help you understand proof by contradiction, and dis-proof by counter-example. Try it yourself. Intuitively can see how to prove A implies B or C? How would you set up the Venn diagram? Well, you want to show ‘A is a subset of B union C’. Drawing the diagram shows you this is equivalent to showing that if you are ‘in A’ but (and) not ‘in B’ then you must be ‘in C’. Geddit?
So diagrams and intuition are very important in mathematics. But
a diagram is not a proof! Nota Bene! Diagrams only help us to see what’s going on; they are only an aid to formulating our ideas and proofs precisely and rigorously; seeing why things should be a certain way. In fact, diagrams can sometimes be misleading, although they are often helpful-- so beware!
You have to understand the concepts. For example, you should have an intuitive idea of what a convergent sequence is. Perhaps draw a picture. Now how would you define a convergent sequence? Really, try defining it yourself from scratch. Then look at the definition in the book and try and see how it relates to convergence of a series. Compare and contrast with your own definition to see where it falls short. The point is to
understand the definition, not to memorise it. Understand it thoroughly and you won't have to memorise the definition, you can reconstruct it at will. But in the beginning it is often helpful to memorise definitions and theorems, word for word.
Theorems are similar stuff. First understand intuitively what is going on. Diagrams are always useful; always draw a picture or visualise it. For instance, you may have seen the theorem that every convergent sequence has one limit. Obvious, but the proof? What if a convergent sequence had two limits? Then what? Well then, the definition of convergence tells us intuitively that all the terms of the sequence should eventually get arbitrarily close to both the limits. Aha! Contradiction. From there you can work on formalising the proof; making it rigorous, mathematical, and clear.
You should understand the limits of definitions and theorems. Why is this definition/theorem like
this, and not like
that? What happens if I change it slightly here? Why do we need this condition, and what happens if I drop it? Etc.
When you come to a new theorem, cover up the proof and first try and prove it yourself. Give yourself some time, and if you make no headway, look at the first few lines of the proof and try again. You understand a proof far more if you’ve tried working on it yourself first, than if you simply read what is given to you. When you come to a definition/theorem, try and give your own examples. What happens if you drop one of the conditions in the hypothesis? What goes wrong, why doesn’t the conclusion follow?
If you are having trouble with a proof, maybe looking back at other problems will help. Can you use some of the techniques here? How did the author go about proving a similar problem, and will it work here? Also see how the author uses the various types of proof and dis-proof.
Always keep clearly in mind what you can assume and what you can not. Do not make implicit assumptions that are not stated in any definitions or in the hypothesis of the theorem. Do not assume too much. Keep in mind the relevant definitions and previous theorems. When you have some theorem about convergent sequences, recall the definition of convergent series and use it exactly. You may also use theorems about convergent series you have already used. But do not– never!-- use ‘obvious’ statements that you have not proved. No matter how trivial it seems to you, it still needs a proof. Also, many innocuous and trivial-looking statements have very non-trivial proofs.
Quantifiers. The order of quantifiers is very important. Contrast the following:
a) For every integer, there exists another integer larger than it.
b) There exists an integer which is larger than every integer.
If you write that out explicitly with quantifiers (do so), you’ll see the only difference is the change in the position of the quantifiers, yet the two statements say completely different things: the first is correct, the second is patently false.
Also understand how negation works with quantifies and statements. Very important.
Also note the different terminology, and different ways of expressing the same ideas. For instance, ‘A is sufficient for B’ simply means ‘A implies B’, and so on.
These are just some of the pointers I can think of off the top of my head. But the most important thing is to put in a lot of work. Your understanding and mathematical power is a monotonically increasing function of the effort you put in. Hard work is most important, but working intelligently is also important. Constantly think about what you're doing and why. Can this be improved, done better, faster? Etc. Don't do the same thing over and over if it doesn't work. Challenge yourself with hard problems just out of your reach, so when you solve them, you mature a little, mathematically speaking. If you always do easy problems you will never learn anything. But easy problems are good to work on as well. Work on all types of problems, of different levels of difficulty. Don't be discouraged by very difficult problems; keep plugging away, come back to them later.
I hope I have been of some help, though this may be a bit late for the course you are taking now.