Understanding quantum entanglement: Qubits, rebits and the quaternionic approach