I think your query is very generic without a specific answer. The current EJB version is 3.0.
I guess you may like to go briefly through the basic EJB tutorial for the basic groundwork.
EJB is a framework like servlets
which is managed by an application server. As with any framework, it has its syntax, life cycle and terminology. But in very rudimentary terms, this framework is for writing the business logic of your enterprise application along with its database persistence mechanisms.