---
title: Instructions
description:
  Solana instructions are the smallest unit of program execution. Each
  instruction targets one program and specifies accounts, data, and signer
  requirements.
url: /docs/core/instructions
type: conceptual
prerequisites:
  - /docs/core/accounts
  - /docs/core/programs
related:
  - /docs/core/instructions/instruction-structure
  - /docs/core/transactions
  - /docs/core/cpi
---

An instruction is a request to execute a specific function on a Solana program.
Instructions are the fundamental building block for onchain operations. Each
instruction specifies exactly one program to call, the accounts it needs, and a
byte array of data that the program interprets (typically a discriminator to
identify which instruction handler to run, followed by serialized arguments).
Execution logic for each instruction is stored on a
[program](/docs/core/programs), where each program defines its own set of
instructions. To interact with the Solana network, one or more instructions are
added to a [transaction](/docs/core/transactions) and sent to the network to be
processed.

![Diagram depicting a transaction with an instruction, broken up into its 3 components](/assets/docs/core/transactions/instruction.svg)

<Cards>
  <Card
    title="Instruction Structure"
    href="/docs/core/instructions/instruction-structure"
  >
    The three fields of an instruction (program_id, accounts, data),
    AccountMeta, compiled instructions, and the SOL transfer example.
  </Card>
  <Card
    title="Instruction Introspection"
    href="/docs/core/instructions/instruction-introspection"
  >
    How programs inspect sibling instructions in the current transaction via the
    Instructions sysvar.
  </Card>
</Cards>

## Key facts

- **Single program**: Each instruction targets exactly one program via
  `program_id`.
- **Account metadata**: The `accounts` array provides
  [`AccountMeta`](/docs/core/instructions/instruction-structure#account-metadata)
  for every account the instruction reads or writes.
- **Opaque data**: The `data` field is a byte array whose format is defined by
  the target program.
