To program a quantum computer, one must first formulate the problem to be solved as a spin model by mapping it to a set of interacting quantum bits or qubits. The problem is encoded into the states and interactions of the qubits. The connectivity between qubits is defined according to the problem graph. This graph and the interaction weights are then transferred to the quantum computer to find the optimal qubit configuration that solves the given problem. Some potential applications include using quantum annealing to solve optimization problems or running quantum circuits for applications like machine learning. Programming quantum computers is currently challenging but may become simpler over time as the technology develops further.