Assuming you are considering a gate-based quantum computer, the most easy way to produce an entagled state is to produce one of the Bell states. The following circuit shows the Bell state $\left| \Phi^+ \right>$.

By examining $\left| \psi_0 \right>$, $\left| \psi_1 \right>$ and $\left| \psi_2 \right>$ we can determine the entagled state after application of all gates:
1. $\left| \psi_0 \right>$:
Not much happens here since no gates were applied at this point. The state of the whole system is therefore just the tensorproduct of the single states which we write like this:
$$
\left| \psi_0 \right> = \left | 0 0 \right >
$$
2. $\left| \psi_1 \right>$:
The Hadamard-Gate applies on the first qubit which results in the following:
$$
\left| \psi_1 \right> =(H \otimes I)\left | 0 0 \right > = H\left | 0 \right > \otimes \left | 0 \right > = \frac{1}{\sqrt 2} \left (\left | 0 \right > + \left | 1 \right > \right ) \left | 0 \right > = \frac{1}{\sqrt 2} \left (\left | 0 0 \right > + \left | 1 0 \right > \right )
$$
3. $\left| \psi_2 \right>$:
Now a CNOT gate is applied and flips the second qubit but only where the first one has the value 1. The result is
$$
\left| \psi_2 \right> = \frac{1}{\sqrt 2} \left (\left | 0 0 \right > + \left | 1 1 \right > \right )
$$
This last state $\left| \psi_2 \right>$ is an entagled state and usually the most natural way to come up with such a situation. Bell states occure in a lot of interesting quantum algorithms such as super dense coding or teleportation.
Although the approach above might not seem like programming to you in a usual sense, applying gates to states is basically how programming a gate-based quantum computer works. There exists abstraction layers that allow you to perform high-level programming but translate the commands to the application of gates. The IBM Quantum Experience interface provides such features.
In a language like Microsoft's Q# the above example could look similar to this:
operation BellTest () : ()
{
body
{
// Use two qubits
using (qubits = Qubit[2])
{
Set (One, qubits[0]);
Set (Zero, qubits[1]);
// Apply Hadamard gate to the first qubit
H(qubits[0]);
// Apply CNOT gate
CNOT(qubits[0],qubits[1]);
}
}
}
A more detailed version (including measurement) can be found here: Microsoft: Writing a Quantum Program.