I would be very grateful If someone could state a precise definition (direct one and inductive one) of a cell complex and CWcomplex, since my intuition is telling that some restriction is missing and also, the definitions from several books seem to be very different. Conciseness is much desired, since everything seems so complicated.
1) DEFINITIONS From Introduction to Topological Manifolds (J. M. Lee)
and from Algebraic Topology (T. tom Dieck):
These definitions are so complicated, that I can’t really see what’s going on.
Let Bn denote a closed nball. As far as I know, a cell complex is a space, obtained as X=∪i∈N0X(i), such that
 X(0) is a discrete space and
 X(n) is obtained from X(n−1) by attaching ncells, i.e. X(n) = X(n−1)∪fλ∐λ∈ΛBn = X(n−1)∐∐λ∈ΛBn/x∼fλ(x);x∈Sn−1,λ∈Λ and
 A⊆X is closed in X ⟺ ∀n∈N0: A∩X(n) is closed in X(n).
2) MY PROBLEM: But shouldn’t there be some condition on fλ? For example, if we have a graph (1dimensional complex) consisting of a single vertex and a single edge. Then when we are attaching B2, we can set f to map the whole S1 to a single point on the edge, that isn’t the vertex. Thus we get a very weird space:
Shouldn’t f go along each loop/edge in X(1) integer many times and not stop in the middle? Also, how do we prevent f from oscillating infninitely? For example, if X(1) contains two edges a,b⊆{0}×R⊆R2 with a∩b={(0,0)}, then f(x)=(0,x2sin(1/x)) can go infinitely many times into a and b.
3) UNNECESSARY: If you have time/patience/interest, the definitions of a simplicial complex, abstract simplicial complex, Whitehead complex and any other complex are also welcome.
Answer
No part of the definition of a CW complex prevents the sorts of examples that you have indicated. In particular:

It is perfectly fine for the entire boundary of a 2cell to be attached to a single point in the middle of a 1cell.

It is perfectly fine for the boundary of a 2cell to be attached to a 1cell in an oscillating fashion, e.g. locally resembling xsin(1/x).
I think you have a good understanding of the definition of a CW complex, you are just confused about how a definition this general could be useful.
The reason is that algebraic topology is mostly defined up to homotopy equivalence. This is usually defined as follows: two spaces X and Y are homotopy equivalent if there exist maps f:X→Y and g:Y→X so that f∘g and g∘f are homotopic to the identity map. Homotopy equivalent spaces have the same homotopy groups, the same homology and cohomology groups, and essentially all the same homotopical properties.
The reason that wildness of the attaching maps fλ is unimportant is that any “wild” CW complex is homotopy equivalent to a “tame” CW complex. In particular, the homotopy type of a CW complex is entirely determined by the homotopy classes of the attaching maps. That is, if you replace one of the attaching maps by a homotopic map, then the resulting CW complex is homotopy equivalent.
For example, if the entire boundary of a 2cell is attached to the middle of a 1cell, this is homotopic to a map that attaches the entire boundary to a nearby 0cell, so the two resulting complexes are homotopy equivalent. Similarly, any oscillating map like xsin(1/x) is homotopic to a more reasonable map, so any CW complex with an oscillating attachment is homotopy equivalent to one with nicer attaching maps.
Indeed, assuming we are willing to work up to homotopy equivalence, we can assume that the boundary of any 2cell maps to either

A single 0cell via a constant map, or

To a closed loop of edges in the 1skeleton, using a map which is locally an embedding.
This is how topologists tend to think of cell complexes for the purposes of algebraic topology.
Incidentally, the reason that it is useful to allow arbitrary attaching maps is that it glosses over the problem of how to choose a “nice” representative for each homotopy class of maps from the boundary of an ncell to the (n−1)skeleton. Though it’s obvious how such “nice” representatives should work when n=2, it becomes less clear in higher dimensions.
For example, it is possible to have a CW complex whose 2skeleton is a 2sphere, and then attach a 4cell to the 2skeleton using a nontrivial element of π3(S2). That is, the boundary of the 4cell is a 3sphere S3, which is being attached to the sphere S2 via the Hopf map S3→S2. This is actually a very useful cell complex, because it gives a cell structure for the projective space CP2 with only three cells.
Simplicial complexes are much simpler: they are truly just combinatorial objects, with simplexes glued together using the simple linear identifications. The disadvantage is that a simplicial complex must usually have many more simplices than the cells of a cell complex. For example, there exists a CW complex for the torus that has only four cells, while a simplical complex homeomorphic to a torus requires at least a couple dozen simplices. In general, putting a CW structure on a space requires only homotopy information, while putting a simplicial structure on the space requires a much more careful consideration of the geometry.
Edit: By the way, the best place to learn about cell complexes and their relation to homotopy equivalence is Chapter 0 of Hatcher’s algebraic topology book.
Attribution
Source : Link , Question Author : Leo , Answer Author : Jim Belk