All of the above applies for an international to domestic connection at a US Border Entry point. Nothing to worry about, even if things go slightly pear-shaped.
Slightly different procedures would apply if you were travelling via a Canadian airport with US pre-clearance facilities. i.e. LHR-YYZ-BOS.
Even different procedures would apply, at the connecting point, if you were travelling via another non-CA/US point. i.e. LHR-CDG-BOS.
The third is the easiest, the first two about the same. Just remember that you must collect your checked luggage and take it through Customs - even if the bag is checked through to BOS. Once you clear customs you should see a 'flight connections' desk where you can drop off your bag. I don't know EWR but it should be clearly indicated.