I will be including both an basic explanation of what it is and its proof.
I'm guessing you are either learning about conditional probability at school or preparing for competitions.
Baye's theorem states:
That is the theorem itself and it means that the probability that event A happens given B is true equals the probability event B happens given A is true times the probability event A happens divided by the probability B happens.
That was the basic of the theorem and the proof of this is basically just testing how well you understand what conditional probability is.
Now we know that the probably that A and B both happens is the same as the probably that B and A both happens.
Therefore P(A|B) can be seen as P(B|A) multiplied by P(A) and then divided by P(B) which gives the right hand side of the first equation. And this is basically the theorem.
**Note P(B) have to be not equal to 0 because having a 0 in the denominator would make this equation undefined.
If you have any questions or need further explanations please ask me in the comments of the answer, I hope this helped!