Level 1: AI Basics

Neural Networks Explained Simply: Neurons, Layers and a Ripe Mango Example

Satvik ParamkushamUpdated October 5, 202615 min read

Quick answer

A neural network is a type of machine learning model made of layers of small connected units called neurons. Each neuron takes numbers in, multiplies them by weights, adds them up and passes a signal forward. By adjusting those weights from examples, the network learns to recognise patterns in images, sound, text and data.

In Hindi: Neural network ek computer model hai jo dimaag ke neurons se prerit hai: chhote chhote units layers mein jude hote hain aur examples dekh kar pattern pehchanna seekhte hain.

Table of Contents

Every time your phone recognises your face, Google Translate turns Hindi into English, or ChatGPT finishes your sentence, a neural network is doing the work. It is the engine inside almost all modern AI.

The name sounds scary, as if you need a medical degree and a maths PhD. You need neither. A neural network is a big team of tiny calculators, arranged in layers, that pass numbers to each other. Each calculator is simple. The team, after enough practice, becomes surprisingly smart.

When I teach neural networks, I start without a single equation. First you get the picture: neurons, layers and weights. Then we work through a toy example everyone in India understands, deciding whether a mango is ripe, with only school-level maths. By the end you will know what a neural network is, how it works and learns, its architecture, the main types, and exactly what CBSE Class 10 AI students need for exams.

What is a neural network in simple words?

In simple words, a neural network is a computer system that learns to recognise patterns by passing information through layers of connected units, loosely inspired by how neurons in the brain connect.

Picture a classroom quiz with three rows of students:

  • The first row reads the question and passes their notes back.
  • The middle row combines those notes and spots useful clues.
  • The last row gives the final answer.

Each student only does a tiny bit of work. But each note they pass has an importance score attached, and after every wrong answer the teacher adjusts those scores. After hundreds of quizzes, the class gets very good at that type of question. That is a neural network: the students are neurons, the rows are layers, and the importance scores are weights.

The word "neural" comes from biology, but do not take it too literally. A neural network is maths running on a computer, not a digital brain. The brain was the inspiration, not the blueprint.

What is a neural network in AI and machine learning?

In AI, a neural network is one specific kind of machine learning model, and networks with many layers are what we call deep learning.

Here is how it fits in the bigger picture:

  • Artificial intelligence is the broad goal of making machines act smart.
  • Machine learning is the approach where machines learn from data.
  • Neural networks are one family of machine learning models (others include decision trees and linear regression).
  • Deep learning means using neural networks with many hidden layers.

If this nesting is new to you, AI vs ML vs deep learning explains it with a full comparison table.

Neural networks are not new. Warren McCulloch and Walter Pitts described a mathematical model of a neuron in 1943, and Frank Rosenblatt built the perceptron, a single-layer network, in 1958. A training method called backpropagation was popularised in 1986 by David Rumelhart, Geoffrey Hinton and Ronald Williams. What changed in the 2010s was not the core idea but the fuel: far more data and fast GPUs.

Why do neural networks matter so much now? Because they handle messy, raw data that older methods struggled with: photos, voice recordings, handwriting and natural language. The large language models behind ChatGPT, Gemini and Claude are giant neural networks trained on huge amounts of text.

Neural network architecture: input, hidden and output layers

A neural network's architecture is its layout: an input layer that receives data, one or more hidden layers that process it, and an output layer that gives the answer.

The three layers

  1. Input layer: takes in the raw data as numbers, such as pixel values of an image or features like colour and size. It does no calculation; it just passes data in.
  2. Hidden layers: do the real work. Each neuron here combines inputs from the previous layer and finds patterns. They are called "hidden" because you never see their values directly.
  3. Output layer: gives the final result, like "ripe" or "not ripe", a digit from 0 to 9, or the next word in a sentence.

The key parts inside

PartWhat it doesSimple analogy
Neuron (node)Adds up its weighted inputs and passes on a signalOne student in the quiz team
WeightDecides how important each input isHow much you trust each friend's advice
BiasShifts the neuron's threshold up or downYour mood before you even hear the advice
Activation functionDecides how strongly the neuron firesDeciding whether the total is enough to say "yes"

Common activation functions include ReLU (keeps positive values, turns negatives into zero) and sigmoid (squeezes any number into a value between 0 and 1, handy for probabilities).

A network where every neuron in one layer connects to every neuron in the next is called fully connected or dense. When a network has many hidden layers, it is a deep neural network.

How does a neural network work, step by step?

A neural network works by sending numbers forward through its layers, with each neuron multiplying inputs by weights, adding them up and applying an activation function, until the output layer produces an answer.

This forward journey is called a forward pass. Here it is in order:

  1. Turn the input into numbers. A photo becomes pixel values, a sentence becomes tokens and then numbers, a mango becomes scores for colour, softness and smell.
  2. Feed the numbers into the input layer.
  3. Each hidden neuron calculates a weighted sum. It multiplies every input by its weight and adds them up, then adds its bias.
  4. Apply the activation function. This decides how much signal the neuron sends forward.
  5. Repeat layer by layer. The outputs of one layer become the inputs of the next.
  6. Read the output layer. The final numbers become a prediction, often a probability like "82 percent ripe".

That is all the network does when it is answering. No magic, no thinking in the human sense. Just multiplication, addition and a simple squashing function, repeated many times.

What makes it powerful is the stacking. In an image network, early layers tend to react to edges and colours, middle layers to shapes like eyes or wheels, and later layers to whole objects like faces or cars. Nobody programs those layers to do that. They end up that way through training, which the next sections cover.

Neural network example: is this mango ripe?

The simplest neural network example is a single neuron that decides whether a mango is ripe from three inputs: colour, softness and smell.

Give each input a score from 0 to 1:

  • Colour: 0 means fully green, 1 means fully yellow.
  • Softness: 0 means rock hard, 1 means very soft.
  • Smell: 0 means no smell, 1 means a strong sweet smell.

Now pick starting weights and a bias. Colour gets weight 0.5, softness 0.3, smell 0.2, and the bias is minus 0.5. The rule: if the final total is above 0, say "ripe".

Mango A: colour 0.9, softness 0.8, smell 0.7
Weighted sum = (0.9 x 0.5) + (0.8 x 0.3) + (0.7 x 0.2)
             = 0.45 + 0.24 + 0.14 = 0.83
Add bias     = 0.83 - 0.5 = 0.33
0.33 is above 0, so the neuron says: RIPE

Mango B: colour 0.2, softness 0.3, smell 0.1
Weighted sum = 0.10 + 0.09 + 0.02 = 0.21
Add bias     = 0.21 - 0.5 = -0.29
-0.29 is below 0, so the neuron says: NOT RIPE

If we used a sigmoid activation instead of a simple yes-or-no rule, Mango A would get about 0.58 (a 58 percent chance of ripe) and Mango B about 0.43.

Now the interesting part. Some varieties, such as Langra, can stay fairly green even when ripe. If Mango B was actually a ripe Langra, our neuron got it wrong because it trusts colour too much. Training would nudge the colour weight down and the softness and smell weights up. Show it hundreds of mangoes, and the weights settle at values that work for most varieties.

A real network would have many such neurons in hidden layers, each learning a different clue, but every one of them does exactly this calculation.

How does a neural network learn? Training explained

A neural network learns by making a prediction, measuring how wrong it was, and then adjusting its weights slightly to be less wrong next time, repeated over thousands or millions of examples.

The training loop has four parts:

  1. Forward pass: the network makes a prediction, like "not ripe".
  2. Loss: a loss function measures the error by comparing the prediction with the correct label, "ripe".
  3. Backpropagation: the error is sent backwards through the network to work out how much each weight contributed to the mistake.
  4. Gradient descent: each weight is nudged a small step in the direction that reduces the error. The size of that step is set by the learning rate.

One full pass through the training data is called an epoch, and training usually runs for many epochs.

Here is an analogy I use a lot: imagine walking down a hill blindfolded at night, trying to reach the lowest point. You feel the slope under your feet and take a small step downhill. Then another. Gradient descent does the same thing, where the "hill" is the error and the "lowest point" is the best set of weights.

Two problems every beginner should know:

  • Overfitting: the network memorises the training examples instead of learning the general pattern, like a student who mugs up answers and fails when the question is reworded.
  • Not enough data: neural networks are hungry. With only a few dozen examples, a simpler model often does better.

If you enjoy seeing this visually, the free TensorFlow Playground website lets you train a tiny network in your browser and watch the weights change.

Neural network for CBSE Class 10 AI: what to write in exams

For CBSE Class 10 AI, a neural network is described as a machine learning system loosely modelled on the human brain, made of an input layer, hidden layers and an output layer, which learns features from data by itself.

Points that commonly appear in Class 10 AI material and answers:

  • Neural networks are inspired by the neurons in the human brain.
  • They have three kinds of layers: input, hidden and output.
  • The input layer only receives data and does no processing.
  • Hidden layers do the processing, and there can be many of them.
  • The output layer gives the final result to the user.
  • A key advantage is that neural networks extract features automatically, so programmers do not need to hand-pick them.
  • They work best on large datasets, such as images, and generally perform better as data grows.

A model exam answer for "What is a neural network?" could be:

A neural network is an AI model inspired by the human brain. It consists of layers of interconnected nodes (neurons): an input layer that receives data, hidden layers that process it, and an output layer that gives the result. Each connection has a weight, and the network learns by adjusting these weights from training data. Neural networks can extract features automatically and work well with large datasets, which is why they are used in face recognition, speech recognition and self-driving technology.

Neural networks connect to the modelling stage of the AI project cycle. Textbooks and syllabus versions change, so match your answer to the exact wording your school's current book uses.

Types of neural networks (with examples)

The main types of neural networks are feedforward networks, convolutional networks, recurrent networks and transformers, each suited to a different kind of data.

TypeBest forEveryday example
Feedforward (MLP)Simple tables of numbersPredicting exam scores from study hours and attendance
Convolutional (CNN)Images and videoFace unlock, Google Lens, X-ray analysis
Recurrent (RNN, LSTM)Sequences, older approach for text and speechEarlier versions of voice typing and translation
TransformerLanguage and, increasingly, images and audioChatGPT, Gemini, Claude, modern translation

A few notes to make the table click:

  • Feedforward networks are the basic version from our mango example: data flows one way, input to output.
  • CNNs scan an image in small patches, which makes them good at spotting edges, textures and shapes wherever they appear.
  • RNNs and LSTMs read sequences step by step with a kind of memory. For language they have been largely replaced by transformers.
  • Transformers, introduced in 2017, use a trick called attention to look at all words in a sentence at once and decide which ones matter most. Read more in what is a transformer model.

My contrarian take: beginners should not start with transformers, even though they are the most famous. Build one small feedforward network first. Once the basic neuron and training loop feel obvious, transformers turn out to be the same ingredients arranged in a smarter way.

Neural network examples in real life

Neural networks power many tools you use daily, especially anything that deals with images, speech or language.

Common real-life examples:

  • Face unlock and photo search: networks recognise faces and objects in your gallery.
  • Voice typing in Indian languages: speech recognition turns your Hindi, Tamil or Bengali voice notes into text.
  • Translation: tools like Google Translate use neural networks to translate between Indian languages and English.
  • Recommendations: YouTube and streaming apps use neural networks among other models to predict what you will watch next.
  • Medical imaging: research systems help doctors spot signs of disease in X-rays and eye scans, usually as a second opinion, not a replacement.
  • Chatbots: ChatGPT, Gemini and Claude run on very large transformer networks.

Companies do not always disclose exactly which models they use, so read these as typical uses of neural networks rather than confirmed technical details.

I would add one honest caution. Neural networks are excellent pattern-matchers, but they do not explain their reasons well. When a network says "suspicious payment" or "not ripe", it usually cannot tell you why in plain words. That is why people check neural network decisions carefully in areas like health, loans and hiring.

Key takeaways

  • A neural network is a machine learning model made of layers of connected neurons that learn patterns from data.
  • Its architecture has an input layer, one or more hidden layers and an output layer; many hidden layers make it deep learning.
  • Each neuron multiplies inputs by weights, adds a bias and applies an activation function.
  • Learning means adjusting weights: forward pass, measure the loss, backpropagation, then gradient descent.
  • Main types are feedforward, CNN, RNN and transformer, and transformers power today's large language models.

Try it yourself

Paste these into ChatGPT, Claude or Gemini to learn Neural Network by doing.

Explain neural networks with a toy example

Explain how a neural network works using a simple example of deciding whether a mango is ripe. Use 3 inputs, show the weighted sum calculation with numbers, and explain how the weights would change after a wrong answer.

Prepare a Class 10 exam answer

I am a CBSE Class 10 AI student. Write a 5-mark answer on neural networks covering their structure, layers, features and two real-life applications. Then quiz me with 3 short questions.

Visualise layers in an image network

Describe, step by step, what the early, middle and later layers of a neural network might detect when recognising a cat in a photo. Keep it simple enough for a beginner with no maths background.

Quick quiz: test yourself on Neural Network

1. Which layer of a neural network does no calculation and only receives data?

  1. Hidden layer
  2. Output layer
  3. Input layer
  4. Activation layer
Show answer

C. Input layer. The input layer simply passes the raw data into the network. Processing happens in the hidden layers.

2. In a neural network, what does a weight represent?

  1. The size of the training dataset
  2. How important an input is to a neuron
  3. The number of layers in the network
  4. The final answer of the network
Show answer

B. How important an input is to a neuron. Each connection has a weight that scales its input. Training adjusts these weights so the network makes better predictions.

3. What is the name of the method that sends the error backwards to update weights?

  1. Forward pass
  2. Backpropagation
  3. Tokenisation
  4. Overfitting
Show answer

B. Backpropagation. Backpropagation works out how much each weight contributed to the error, and gradient descent then adjusts the weights.

Frequently asked questions

What is a neural network in simple words?

A neural network is a computer model made of many small connected units called neurons, arranged in layers. Each neuron does a simple calculation and passes the result forward. By adjusting the connections from examples, the network learns to recognise patterns like faces, voices or words.

Neural network kya hai?

Neural network ek machine learning model hai jo insaani dimaag ke neurons se prerit hai. Isme input, hidden aur output layers hoti hain, aur yeh examples dekh kar apne weights badalta hai taaki sahi jawab de sake. Face unlock aur ChatGPT jaise tools isi par chalte hain.

What are the 3 layers of a neural network?

The three layers are the input layer, which receives the data, the hidden layers, which process it and find patterns, and the output layer, which gives the final result. A network can have many hidden layers, and networks with many of them are called deep neural networks.

What is the difference between a neural network and deep learning?

A neural network is the model structure of neurons and layers. Deep learning is the practice of using neural networks with many hidden layers. So every deep learning model is a neural network, but a tiny network with one hidden layer is usually not called deep.

Is a neural network the same as the human brain?

No. Neural networks were loosely inspired by brain neurons, but they are mathematical models running on computers. The human brain has an estimated 86 billion neurons and works in ways scientists still do not fully understand, while an artificial neuron is just a weighted sum and a simple function.

What is an example of a neural network in real life?

Face unlock on smartphones is a common example, since a neural network learns to recognise your face from a few scans. Voice typing, Google Translate, photo search and chatbots like ChatGPT also run on neural networks.

Do I need maths to learn neural networks?

You can understand the core idea without maths, using examples like the ripe mango. To build and tune networks yourself, school-level algebra plus basic ideas from statistics and calculus help a lot. Most learners pick up the maths gradually alongside Python practice.

References