The main idea is that when we apply measurement to qubit by default in qiskit it measures in Z bases. So applying a H gate before measurement changes the measurement bases to X bases where we have |+> and |-> bases instead of |0> and |1> bases as like in normal Z measurement.
So based on what state you measure we can have the below results.
For |0> state when measured in X basis (which is H followed by measurement):
The Hadamard action on |0> states brings it to |+> state and when we measure along Z (meaning that you are projecting on Z basis) it may collapse 50% to 0 and 50% to 1.
For |1> state when measured in X basis
As like you would expect we get 50% probability for 0 and 1. (with 1 phase shifted by Pi).
Now when you measure |+> the states in H bases which is X measurement.
Since we measure |+> on |+> and |-> bases we get 100% probability of |+> state and since we don't have direct X measurement to see |+> state we take a H gate and perform Z measurement. The output |0> denotes that its 100% in |+> state. Since we don't have any visualization for X measurement, we use Z bases to visualize the outcome by applying H gate. The reason for operation is that H distinguishes between + and - state by 0 and 1. If the outcome of this kind of measurement is 0 it denotes that we are in + state.
Now when you measure the states |-> in H bases which is X measurement.
The reason being that here we have initialized the qubit to |-> state and since we measure the qubit in |+> and |-> bases we ought to get |-> bases as the result of measurement. Since we are in the X view we are not able to see the 50% probability of 0 and 1, and so it is collapsed to 1 based on the H operation.