Finding the probability of a message encrypting to a given ciphertext I have been watching a crypto course and when they wanted to prove that the OTP is a secure cipher they refer to the probability and what I can't get so far is the understanding of this notation ?

$$P(E_k(m)=c)$$

The probability of a message encrypted to a cipher? How is that?

The general formula is:

$$P(m=m∗|E_k(m)=c)=P(m=m∗)$$

where 


$m$ is the message to be encrypted
$m∗$ is the message that the attacker guesses
$c$ is the cipher text
$E_k$ is the encryption function
Part of your confusion is coming from ignoring the distinction between random variables (e.g., $K$) and their values (e.g., $k$).

Let $p$ be probability distribution of the keys $k\in {\cal K}$ and let $q$ be the probability distribution of the messages $m \in {\cal M},$ assuming both sets $\cal K$ and $\cal M$ are finite. The encryption mapping $E_K(M):=E(K,M)$ is a mapping  $$E:{\cal K} \times {\cal M} \rightarrow {\cal M}$$ 
where we assume the ciphertext space is also $\cal M$ for simplicity. Clearly a well defined cipher would select keys independently of the messages.

Then, using the definitions of conditional probability all quantities can be evaluated. In particular, the ciphertext distribution is directly obtained from the other two distributions since it is completely determined by them.

In general one could have $m$ mapping to $c$ under different key values $k$ and these will need to be summed, each admissible choice weighted by $p(k)q(m).$

Clearly, $P(m=m_1)=q(m_1),$ while $P(m=m_1|E_k(m)=c)$ is $$P(m=m_1|E_k(m)=c)=\frac{\sum_{k\in {\cal K}:E_k(m_1)=c}p(k)q(m_1)}{\sum_{k\in {\cal K},m\in {\cal M}:E_k(m)=c}p(k)q(m)}  $$
where the numerator is taken to be zero in case of an empty sum, and $c$ is fixed.