Make sure that your components folder is under the project folder directory, and that your custom component file is under components folder.
Also, the name of your custom components file should always start with capital letters.
for example: 'Navbar.js' and not 'navbar.js'
Notice that the first letter of the name of the function is also in capital format.
Then,
Under 'pages' folder, inside the '_app.js' file you should include the tag of your component:
Notice that we imported the Navbar in the first line.