I will be travelling to India from DFW with a connecting flight on United. I have a 2-hours layover in EWR Newark. Do I need to do immigration in Newark or in DFW? Both my flights are with United. What would be my terminal for the Mumbai flight from EWR? Is 2 hours enough?
Assuming you have purchased this as a single ticket, two hours should be quite sufficient unless your flight is significantly delayed. You won't go through any kind of immigration control departing the US, just normal airport security at DFW and Indian immigration when you arrive at BOM. At EWR, all you'll need to do is get to your next gate and board the plane.
Most United flights at Newark depart from Terminal C, and that seems to include the normal gates for DFW and BOM flights. If you do wind up in Terminal A, there is a shuttle bus between terminals inside the secure area that you can take so you won't have to go through security again.