Home / Blog / AI

What Is AI? A Beginner’s Guide to How It Works

A plain-English guide to artificial intelligence: what it is, how machines learn from examples, how chatbots write answers, and how to use AI safely.

AIMachine LearningGenerative AIBeginners

Artificial intelligence is in the news every day and is quickly finding its way into the tools we use at work and at home. But what actually is it, and how does a computer “learn”? This guide explains AI in plain English, with diagrams and everyday examples. No maths or coding needed.

What is AI?

Artificial intelligence (AI) is the field of building computer systems that can do tasks that normally need human intelligence: recognizing faces in photos, understanding speech, translating between languages, spotting unusual payments, or writing a reply to a question.

Most AI today isn’t a robot with a mind of its own. It’s software that has learned patterns from lots of examples and uses those patterns to make predictions. When your email app moves a message to the spam folder, it’s making a prediction: “this looks like spam”, based on patterns it learned from many other emails.

The big shift is how that software gets made. Traditional software follows rules that a programmer writes by hand, such as “if the email contains these words, mark it as spam”. That works until spammers change their wording. Machine learning flips the process around: instead of writing the rules, you give the computer lots of examples along with the right answers, and it works out the rules itself. The result of that learning is called a model.

Traditional programming compared with machine learningIn traditional programming a person writes the rules and the computer applies them to data to produce answers. In machine learning the computer is given example data together with the correct answers and works out the rules itself; those learned rules are the model.Traditional programmingHand-written rulesNew data (an email)Computerfollows rulesAnswerspam or not spamMachine learningExample emailsCorrect answersComputerlearnsRules it learned= a model
Traditional software follows rules people write. Machine learning works the rules out from examples.

AI, machine learning, deep learning and generative AI

These terms are often used as if they mean the same thing, but they fit inside each other like nesting dolls:

  • Artificial intelligence is the whole field: any technique that makes computers behave intelligently, including older systems built from hand-written rules.
  • Machine learning is the part of AI where systems learn from data instead of following hand-written rules. Most AI you meet today is machine learning.
  • Deep learning is a kind of machine learning that uses large neural networks (more on those below). It powers image recognition, speech recognition and modern translation.
  • Generative AI uses deep learning to create new content (text, images, audio or code) rather than only labeling what it sees. Chatbots such as ChatGPT, Claude, Gemini and Microsoft Copilot are generative AI.
How AI, machine learning, deep learning and generative AI fit togetherFour nested circles. Artificial intelligence is the largest. Inside it is machine learning, inside that is deep learning, and inside deep learning is generative AI.Artificial intelligenceMachine learningDeep learningGenerativeAI
Each field sits inside the one before it: all generative AI is deep learning, all deep learning is machine learning, and all of it is AI.

How a machine learns from examples

Imagine teaching a computer to tell cats from dogs. You collect thousands of photos, each labeled “cat” or “dog”. These labeled examples are the training data.

At the start, the model knows nothing, so its guesses are no better than a coin toss. Training is a loop: show it a photo, let it guess, check the guess against the label, and adjust the model slightly so it’s a little more likely to get that kind of photo right next time. Then repeat with the next photo, and the next, many thousands or even millions of times.

The training loopA cycle of four steps: show the model an example, let it guess, check the guess against the correct answer, and adjust the model slightly. The cycle repeats many times.1. Show an examplea photo labeled “cat”2. Make a guessthe model says “dog”3. Check the answerwrong: measure the error4. Adjust slightlytweak it to do betterRepeatagain and again
Training is a loop. Each pass changes the model only a tiny amount, but over many examples it gets steadily better.

Each adjustment is tiny, but together they add up. Gradually the model picks up the patterns that tend to separate cats from dogs, without anyone ever writing those patterns down. To make sure it has really learned rather than memorized, developers then test it on photos it never saw during training.

Training a model versus using it

Training happens ahead of time and needs a lot of data and computing power. Once a model is trained, it’s saved, and using it is quick: you give it something new and it gives you a prediction. Using a trained model is called inference. Every time you ask a chatbot a question or unlock your phone with your face, you’re using a model that was trained earlier.

Training a model compared with using itTop row: lots of labeled examples go into training, which produces a trained model. Bottom row: a new input goes into that same trained model, which returns a prediction.Training: slow, done ahead of timeLots of exampleseach with an answerTrainingadjusting the modelTrained modelsaved, ready to useUsing it: quick, every timeNew photonever seen beforeTrained modelthe same modelPrediction“cat”
Training is slow and happens ahead of time. Using the trained model, called inference, takes a fraction of a second.

What’s inside: neural networks in simple terms

Most modern AI models are neural networks, loosely inspired by the way brain cells connect. Despite the name, they aren’t brains. They’re a large amount of simple arithmetic arranged in layers:

  • The input layer receives the data. For a photo, that’s the color values of its pixels.
  • The hidden layers each combine the numbers from the layer before and pass the result on. Early layers tend to respond to simple patterns such as edges, and later layers to bigger shapes such as ears or eyes.
  • The output layer gives the answer, often as a confidence score for each option.

Every connection has a weight: a number that controls how strongly one unit influences the next. Think of the weights as volume dials. Training is the process of turning those dials, a little at a time, until the network’s answers match the right ones. Large modern models have billions of them.

A simple neural networkThree input nodes connect to two hidden layers of four nodes each, which connect to two output nodes. Every node is linked to every node in the next layer. The outputs read cat 92 percent and dog 8 percent.Cat 92%Dog 8%Inputpixel valuesHidden layersfind patternsOutputconfidence
Every line is a connection with a weight, a number the network adjusts during training. The highlighted lines show strong connections. The percentages are made up for illustration.

How chatbots like ChatGPT work

AI chatbots run on large language models (LLMs). An LLM is a deep-learning model trained on a huge amount of text, such as books, articles and websites, with one deceptively simple task: predict what comes next.

Step 1: Predicting the next word

Give a language model the text “The cat sat on the” and it calculates how likely every possible next word is. Strictly speaking, models work with tokens, which are whole words or pieces of words, but thinking in words is close enough.

A language model predicting the next wordGiven the text 'The cat sat on the', the model gives each possible next word a probability: mat 62 percent, sofa 17 percent, floor 12 percent and moon 1 percent.The cat sat on the?The model scores every possible next word:mat62%sofa17%floor12%moon1%
A language model turns any text into a list of likely next words. These numbers are made up for illustration.

To get good at predicting text on every subject, a model has to pick up a lot along the way: grammar, facts about the world, writing styles and common patterns of reasoning, because all of them help it predict what comes next.

Step 2: Writing one word at a time

When you ask a chatbot a question, it doesn’t look up a stored answer. It predicts a likely first word, adds it to the text, then predicts the next word based on everything so far, and repeats until the answer is complete. That’s why answers often appear on screen word by word.

A chatbot writing an answer one word at a timeAsked 'Why is the sky blue?', the model adds one word per step: 'Sunlight', then 'is', then 'scattered', then 'by', each time predicting the next word from everything written so far.Why is the sky blue?The answer is written one word at a time:Step 1SunlightStep 2SunlightisStep 3SunlightisscatteredStep 4Sunlightisscatteredby…and so on, until the answer is complete.
Each new word (in blue) is predicted from the question plus every word written so far.

Step 3: Learning to be a helpful assistant

A model trained only to predict text would simply continue your sentence instead of answering it. So after that first stage, developers train it further on examples of good conversations and on feedback from people who rate its answers. This teaches it to follow instructions, answer questions clearly and decline harmful requests.

Many chatbots can also search the web, read documents you give them or use other tools. That helps them work with up-to-date or specialized information they didn’t see during training.

AI you already use every day

You probably use AI many times a day without thinking about it. Each of these features is a model trained on examples: spam filters learn from emails people marked as junk, map apps learn from past traffic, and streaming services learn from what similar viewers chose to watch.

Spam filterssort out junk email
Mapspredict travel times
Recommendationswhat to watch or buy
Face unlockrecognize your face
Translationand live captions
Fraud alertsflag unusual payments
Everyday AI you have probably used this week.

What AI can’t do (yet)

AI is powerful, but it has real limits that are worth understanding:

  • It can be confidently wrong. A chatbot generates text that sounds plausible, and plausible isn’t the same as true. When it invents facts, sources or quotes, that’s called a hallucination.
  • It learns our biases. A model learns from its training data, including any unfairness or gaps in it. If some groups of people are under-represented in the examples, the model may work less well for them.
  • Its knowledge has a cut-off date. A model only knows what was in its training data, unless it’s connected to search or to your own documents.
  • It doesn’t understand the way people do. It’s very good at recognizing patterns, but it has no experience of the world, and it can fail in surprising ways on situations unlike anything it was trained on.
  • It doesn’t know your situation. It only knows what you tell it about your business, your customers or your needs.

How to use AI safely and well

  • Check anything important. Verify facts, figures, legal or medical information and code before you rely on them.
  • Protect sensitive information. Don’t paste passwords, customer data or confidential documents into public AI tools. Check the tool’s privacy settings and your organization’s policy first.
  • Be specific. Give context, examples and the format you want. Clear instructions, called prompts, get much better answers.
  • Keep a person in charge. Let AI draft, summarize and suggest, and have a person make the decisions that affect people, money or safety.

Key terms at a glance

  • Model: the result of training, a program that turns an input into a prediction.
  • Training data: the examples a model learns from.
  • Weights (parameters): the adjustable numbers inside a model that training tunes.
  • Inference: using a trained model to make a prediction.
  • Neural network: a model made of layers of connected units.
  • Large language model (LLM): a neural network trained on large amounts of text to predict the next token.
  • Token: a word or piece of a word that a language model reads and writes.
  • Prompt: the instruction or question you give an AI tool.
  • Hallucination: a confident-sounding answer that is false or made up.

The takeaway

AI isn’t magic, and it isn’t a mind. It’s software that learns patterns from large numbers of examples and uses them to make predictions, whether that’s “this email is spam” or “the next word is probably mat”. That one idea explains both why AI is so useful and why it’s still worth checking its work.

If your business is exploring AI, the major cloud platforms, including AWS (through Amazon Bedrock) and Microsoft Azure, offer ready-made AI models as managed services, so you can use them inside your own cloud environment without building anything from scratch. If you’d like help planning that, get in touch.

Bassel Aasi
Bassel Aasi

Cloud engineer and PMP, certified as an Azure Solutions Architect Expert, AWS SysOps Administrator and Terraform Associate. I help businesses build secure, automated infrastructure on AWS and Azure.

Let's talk about your infrastructure

Tell me where you are and where you want to be. I'll reply within 24 hours with practical next steps.