I am new in testing. I want to know:

 - What is component testing? 
 - How to write component test cases?

If anyone can explain with an example this will be more helpful.