Definition of submanifold. In my textbook, submanifold is defined as follows: If $X$ and $Y$ are both manifolds in $\mathbb{R}^n$ and $Y\subset X,$ then $Y$ is a submanifold of $X.$
I think that the topology of $X$ and $Y$ should not be irrelevant and some sort of condition such as "the topology of $Y$ is the subspace topology" is needed. In addition, I think that not only such a topological condition, but also a condition which is relevant to the smooth structures of $X$ and $Y$ is needed.
What is the correct definition of submanifold?
 A: There are two definitions of submanifolds. And sometimes, the word "submanifold" is qualified as either "immersed submanifold" or "embedded submanifold". The textbook definition you have given defines what is called the "immersed submanifold". If the topologies match up (as you would like to have), such submanifolds are said to be "embedded/imbedded".  
Look up the textbook by Guillemin and Pollack for a nice example showing the difference between the two definitions (Figures 1-8 and 1-9 on page 16, to be exact)
A: As udit said there are two kind of sub-manifold "immersed submanifold" and "embedded submanifold". As far as I know this distinction plays a big role in Lie Groups since the theorem that a close subgroups of a Lie group is a again a Lie group is given with immersed manifold and not with embedded manifold.
Anyway to explain a little bit clearly whats going on: if $M$ and $N$ are manifolds and $F$ an injective map between them, then you have just one topology and smooth structure that make $M$ and $F(M)$ diffeomorphic. In this case you have an immersed manifold. If it happens that this topology and smooth structure is the same topology induced by $N$ over $F(M)$ (since $F(M)$ is inside $N$ ) then you have an embedded manifold.
Exemple 1 (immersed and embedded): F is the map between $\mathbb{R}$ and $\mathbb{R}^{3}$  given by $$F(t)=\left(\cos2\pi t,\,\sin2\pi t,\,t\right)$$ 
Exemple 2 (immersed not embedded). F is the map between $\mathbb{R}$ and $\mathbb{R}^{3}$  given by $$F\left(t\right)=\begin{cases}
\left(\frac{1}{t},\sin\pi t\right) & \mbox{por ${1<t<\infty}$}\\
\left(0,t\right) & \mbox{por  ${-\infty<t\leq1}$}
\end{cases}.$$
