Operation of a basic SR latch
In order to understand SR latch, you should know the initial output values P and Q. In working of latch we want P and Q to be complement of each other.That's how latch works.

Once we have that in mind see the following truth table for NOR gate


Now, see the output when A=1 and B=0,1. When one of the input (A=1) of NOR gate is one irrespective of the value of the other input (B=0 or 1), output is going to be zero. This is the reason why both inputs in SR latch can't be 1. Because once both inputs S and R are 1 even though initial values of outputs(P=0,Q=1 or P=1,Q=0) are complement of each other, it will make both outputs P and Q to be equal to 0 which is invalid as functionality of latch. Hence, both S and R as 1 is prohibited.

Once you know the initial output values(P and Q) and two inputs you can find the next output values by following truth table for NOR SR latch