To create arbitrary one qubit state you can use combination of $Rz$ and $Ry$ gates. $Ry(\theta)$ gate takes state $|0\rangle$ to $\cos(\theta/2)|0\rangle + \sin(\theta/2)|1\rangle$. By setting angle $\theta$ you achive desired probabilities of states $|0\rangle$ and $|1\rangle$. If you now apply $Rz(\varphi)$ gate you get state $\mathrm{e}^{-i\varphi/2}\cos(\theta/2)|0\rangle + \mathrm{e}^{i\varphi/2}\sin(\theta/2)|1\rangle$ which is equivalent to
$$
\cos(\theta/2)|0\rangle + \mathrm{e}^{i\varphi}\sin(\theta/2)|1\rangle
$$
because global phase can be neglected. Hence by setting angles $\varphi$ you can set any phase you want. Overall, the state above is the most general description of a qubit. So, this method allows you to prepare one qubit in any state you want.
Note that on IBM Q you can employ gate $U3$ instead.
To prepare multiqubit state is more difficult. You can follow a method in this article:
Transformation of quantum states using uniformly controlled rotations.
In Qiskit, you can use a method initialize
to set a quantum circuit input state:
quantumState = [
1 / math.sqrt(2) * complex(1, 0),
1 / 2 * complex(1, 1)]
q = QuantumRegister(1, name = 'q')
c = ClassicalRegister(1, name = 'c')
circuit = QuantumCircuit(q,c)
circuit.initialize(quantumState, [q[0]])
In this case, one qubit state is prepared, however, matrix quantumState
can be for example
[1 / math.sqrt(2), 0, 0, 1 / math.sqrt(2)]
for Bell state $\frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)$.