Benadryl

How does benadryl work? How is an H1 blocker different from an H2 blocker?