The difference between subgraph and component I'm studying graph theory right now. I've been reading the textbook and searching the internet, but I still can't understand how subgraph and component are different.
Aren't they basically referring to the same thing?
 A: One standard way to categorize graphs is as connected or disconnected.  A disconnected graph can be decomposed into a series of graphs that are not connected to each other.  I would refer to one of those as a component.  A subgraph on the other hand is a subset of vertices of the original graph along with a subset of edges.
A: A component is 'closed' in the sense that if you have some vertex $v$ in a component, then any vertex which can be reached by a walk from $v$ is contained in the component. A subgraph does not have this restriction (it's just a subset of vertices and edges from the entire graph).
A: Let $G$ be a finite simple graph.  What I do below also works for directed graphs, replacing everywhere the word "walk" by "weak walk."
Definition: For vertices $x,y$ in $G$, say $x\sim y$ precisely when there is a walk in $G$ from $x$ to $y$.
Proposition: The relation $\sim$ defined above is an equivalence relation.
Proof: The details are easy to work out formally, so I'll just sketch the proof. (1) the 0-walk $x$ shows $x\sim x$ for all vertices $x$. (2) if $x\sim y$, reverse a walk from $x$ to $y$ to obtain a walk from $y$ to $x$, which shows $y\sim x$. (3) if $x\sim y$ and $y\sim z$, concatenate walks from $x$ to $y$ and $y$ to $z$ to obtain a new walk from $x$ to $z$, thus showing $x\sim z$.  Hence $\sim$ is an equivalence relation.
Definition: The components of $G$ are the induced subgraphs of blocks in $G$ under the equivalence relation $\sim$.
Immediately from the definition, every component of a graph is a subgraph.
On the other hand, not every subgraph of $G$ is a component.  For instance let $G=K_3$ be the complete graph on three vertices.  Graph $G$ has exactly one component (namely itself, $K_3$).  However, $K_3$ contains $K_2$ as a subgraph, and this is not a component of $K_3$ by my remark above.
