How to get intuition in topology concerning the definitions?
Here are some general pointers for gaining intuition in topology:
Learn lots of examples early, and use them to guide your understanding. Take the definition of a topology, for instance. The original motivation for this definition comes from familiar topological spaces, such as the real numbers or, more generally, $\mathbb R^n$ or, more generally still, metric spaces. Learn the definition of continuous maps $\mathbb R^m\to \mathbb R^n$ and between metric spaces in general and then try to understand why the 'open-set' definition of a continuous map is equivalent to these definitions. At this point, it is natural to ask how far we can generalize this definition. Topology is really about replacing '$\epsilon$-balls' in metric spaces with more general 'basic open neighbourhoods' that have precisely the right properties that let us make sense of concepts like 'continuous map' or 'small neighbourhood' that we're used to from real analysis.
Learn how to draw pictures of topological spaces. A seasoned topologist will naturally draw the diagram
for an open set $U$ contained in a topological space $X$ or
for the product space $X\times Y$, even if the spaces don't actually look like that at all. Drawing a diagram will help you get intuition for writing actual proofs.
Recognize that sometimes you're just going to have to do a lot of topology. The definition of a compact topological space is notoriously difficult for newcomers to the subject to internalize. Looking back at my own mathematical development, I don't think that there's anything that anyone could have said to me at the time that would have helped me understand it better. After a few years of using this definition, and working with compact spaces - primarily the closed interval $[0,1]$, I've got a much better understanding of its importance. Indeed, my advice to anyone who wants to understand compactness is to learn a proof of the Heine-Borel theorem (i.e., $[0,1]$ is compact) and then go back and write new proofs of the following theorems from real analysis using only the fact that $[0,1]$ is a compact topological space:
- the Bolzano-Weierstrass theorem
- every continuous function $[0,1]\to\mathbb R$ is bounded
- the Lebesgue number lemma
- the closed graph theorem: a function $f\colon[0,1]\to\mathbb R$ is continuous if and only if its graph $$\Gamma_f=\{(x,f(x))\colon x\in\mathbb R\}\subset[0,1]\times\mathbb R$$ is a closed set.
Keep asking (yourself) questions. You're doing exactly the right thing by questioning the definitions you're seeing. If you blindly accept every definition you're taught without questioning whether it's natural or 'correct' then you'll find that you get to the end of a course in topology without really understanding anything you've been taught. Every time you see a definition, ask yourself 'Why has it been defined this way?' At the same time...
Understand that there's no hurry. If you don't immediately get why a definition is used, don't worry about it and try and move on. Topology has been gone over and refined many times in the hundred or so years it's been around and you can be sure that the definitions you are seeing are natural and very useful. You can also be sure that, over the course of your studies in mathematics, you will come across topology again and again, and this will give you a chance to keep re-asking the questions you've been asking yourself. Each time you'll get more and more answers.
(optional) Learn equivalent definitions. The reason this is optional is that plenty of people have survived perfectly well with the usual definitions from topology, and you certainly shouldn't spend your time learning lots of other definitions if you're having trouble with the existing ones. However, it can be useful to learn some alternative ways of looking at things. For example, here are some alternatives to the 'open set' definition of a topology:
System of basic open neighbourhoods - This is pretty similar to the 'open set definition', but rather than requiring that our collection of sets be closed under unions and all finite intersections, we only require that the intersection of two basic open neighbourhoods can be written as the union of basic open neighbourhoods. This definition is technically less precise than the usual definition, since different systems of b.o.n.s can give rise to the same topology, but it is sometimes more natural. For example, the topology on a metric space is induced by the system of basic open neighbourhoods given by $\epsilon$-balls $B(x,\epsilon)$.
Closure operator It's interesting that the topology on a space $X$ can be deduced from the closure operator $\text{Cl}\colon\mathcal P(X)\to\mathcal P(X)$. This gives rise to an equivalent definition of a topological space; see Wikipedia.
For compactness:
Sequential compactness. This only works for metric spaces, but is still fun. A metric space is compact if and only if it is sequentially compact - every sequence has a convergent subsequence
Categorical compactness. A topological space $X$ is compact if and only if for every topological space $Y$ the projection map $\pi_Y\colon X\times Y\to Y$ is a closed map. See this note.
Your question calls for a textbook. Until you find one, you might try to connect this definition to what you may know about continuous functions of a real variable. Suppose $\tau$ is the set of all unions of open intervals $(a,b)$. Try to write the "$\epsilon-\delta$" definition of continuity using elements of $\tau$ instead of intervals.
I would suggest first studying a good, advanced textbook on multivariable calculus, with a focus on the distance function in Euclidean space, the concept of open subsets of Euclidean space, and the multitude of $\epsilon-\delta$ proofs in multivariable calculus.
Next, I would suggest finding a good textbook on metric spaces, again focussing on the concept of open subsets in relation to $\epsilon-\delta$ proofs. I quite like this book.
With that background, you should have developed a good intuition for open sets, preparing you for the abstract definitions of Topology.