once upon a time there was EJB2 that really sucked and was very difficult to use, and there was Hibernate and Toplink and some other ORM technologies, and sun said ok guys our EJB2 really suck and we have to change them, and in that days Hibernate was used heavily so they asked them if they can cooperate together to make a new specification .. and they agreed.
and JPA was born. which stands for
Java Persistance API, using JPA you annotate beans to be both used for hibernate and EJB3, however there are some things you can do only in hibernate so you sometimes find some annotations that are not under the javax.persistance packages such as the delete orphan in the Cascade type.
in both cases wether you are using Hibernate or EJB3 you will be using the same annotations, the difference is that in EJB3 to access those persistence objects you use an EntityManager while in Hibernate you use a Session, another difference is how transactions are managed.
hope it helps ;).