EJB is a specification for distributed enterprise
java objects. You have Stateless and Stateful Session Beans and Entity Beans. Hibernate is on Object Relational Mapping tool to map relational database tables to your object model.
Hibernate is a solution to the problems of using Entity Beans. So it is like a replacement for the Entity Bean part of EJBs. However,
JBoss's 4.x implementation of EJB 3.0 Entity Beans is in fact Hibernate 3.x
Mark