Check out example codes for "next carousel bootstrap". It will help you in understanding the concepts better.

Code Example 1

<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img class="d-block w-100" src="..." alt="First slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="..." alt="Second slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="..." alt="Third slide">
    </div>
  </div>
  <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

Code Example 2

<div id="demo" class="carousel slide" data-ride="carousel">

  <!-- 
  Indicators -->
  <ul class="carousel-indicators">
    
  <li data-target="#demo" data-slide-to="0" class="active"></li>
    
  <li data-target="#demo" data-slide-to="1"></li>
    <li 
  data-target="#demo" data-slide-to="2"></li>
  </ul>

  <!-- 
  The slideshow -->
  <div class="carousel-inner">
    
  <div class="carousel-item active">
      <img src="la.jpg" 
  alt="Soweto">
    </div>
    <div 
  class="carousel-item">
      <img src="chicago.jpg" 
  alt="Joburg">
    </div>
    <div 
  class="carousel-item">
      <img src="ny.jpg" 
  alt="Pretoria">
    </div>
  </div>

  
  <!-- Left and right controls -->
  <a class="carousel-control-prev" 
  href="#demo" data-slide="prev">
    <span 
  class="carousel-control-prev-icon"></span>
  </a>
  <a 
  class="carousel-control-next" href="#demo" data-slide="next">
    
  <span class="carousel-control-next-icon"></span>
  </a>

</div>

Code Example 3

<div id="demo" class="carousel slide" data-ride="carousel">

  <!-- 
  Indicators -->
  <ul class="carousel-indicators">
    
  <li data-target="#demo" data-slide-to="0" class="active"></li>
    
  <li data-target="#demo" data-slide-to="1"></li>
    <li 
  data-target="#demo" data-slide-to="2"></li>
  </ul>

  <!-- 
  The slideshow -->
  <div class="carousel-inner">
    
  <div class="carousel-item active">
      <img src="la.jpg" 
  alt="Los Angeles">
    </div>
    <div 
  class="carousel-item">
      <img src="chicago.jpg" 
  alt="Chicago">
    </div>
    <div 
  class="carousel-item">
      <img src="ny.jpg" 
  alt="New York">
    </div>
  </div>

  
  <!-- Left and right controls -->
  <a class="carousel-control-prev" 
  href="#demo" data-slide="prev">
    <span 
  class="carousel-control-prev-icon"></span>
  </a>
  <a 
  class="carousel-control-next" href="#demo" data-slide="next">
    
  <span class="carousel-control-next-icon"></span>
  </a>

</div>

Learn ReactJs, React Native from akashmittal.com