Lightning Component :

Components are the self-contained and reusable units of an app
Salesforce lightning is all about component
A component contains attributes ,actions ,actionhandler, events and html and other components

Please refer the previous note's on how to create a lightning component , application etc

component:

Create a lightning component with the below markup code
Name the component as helloWorld

<!--


 * created by 		:		Shiva RV
 * Date				:		13-10-2018
 * Description		:		Hello World Lighting Component
  
-->
<aura:component >
    <!-- notation denotes the comments as in html -->
	<!--this is the lightning app where you can place html codes , associate js code
		also can embed lightning component to it -->
    <!-- an component can stand on it's own or can be used as 
				1: Container Component
				2: Child Component of Another Component or App
				3: Parent Component -->
    <p class="customColor">
    Hello World in Component
        </p>
</aura:component>

Below is the hello world App code:
<!--


 * created by 		:		Shiva RV
 * Date				:		13-10-2018
 * Description		:		Hello World Lighting App
  
-->

<aura:application extends="force:slds">
<!--this is the lightning app where you can place html codes , associate js code
		also can embed lightning component to it -->
    <!--
    <p class="myParaStyle">
    Hello World in App
    </p> -->
    
    <!-- how to add component in class -->
  <!--  <c:HelloWorldComp></c:HelloWorldComp>  -->
</aura:application>

<c:ComponentName> </c:ComponentName> (Use helloWorld Component name you just created)

 
Output:

Key Notes :
*To view the app code and click preview
*App can run independently in browser but component can't run independently