BB84 quantum protocol

In BB84 protocol, when Alice and Bob make key distribution, what is the private thing? They select randomly bases and then make a measurement according to these bases. Used bases are private? I mean that does Eve know which basis was used at each position? If Eve dont know these bases, then How can Alice and Bod share using bases securely? In here, what is public and private?

One intuitive way of viewing where the secret comes from is with EPR-based quantum key distribution (QKD). In this variant, Alice prepares $n$ EPR pairs, i.e. states of the form $$|\Psi^+\rangle= \frac 1{\sqrt{2}}(|00\rangle+|11\rangle).$$ This state has the particularity that if Alice and Bob each share a part of this pair, they will always get the same (random) outcome if they measure in the same basis. This is easily seen as rewritting $|\Psi^+\rangle$ in the diagonal basis: $$|\Psi^+\rangle= \frac 1{\sqrt{2}}(|++\rangle+|--\rangle).$$ If Eve has not tempered with the state Alice sent to Bob (the second half of each of the $n$ EPR pairs), then they can generate a secret key by measuring their part of each pair in a random basis ($+$ or $\times$) and they have a shared, truly random secret key for every pair for which they have used the same basis.
In the original BB84 protocol, Alice generates the randomness classically by choosing at random a state from the set $\{|0\rangle, |1\rangle, |+\rangle, |-\rangle\}$ to send to Bob, but this has been shown to be equivalent to EPR-based QKD.