Blocks are building blocks of Drupal website. Each content in a Drupal website belongs to one block or other. Blocks can be easily displayed in different part of the webpage using regions in themes.
There are two types of custom blocks in Drupal:
- Create using Drupal Graphical User Interface(GUI) system through /admin/structure/block/block-content
- Programmatically create based on your requirement
Let's see each method in more detail below.