In case you don't know, IPN (instant payment notification) is a feature so paypal automatically contacts your site to tell it about things that happen with payments in paypal - like it's been paid, if it was an echeque that it's cleared, it's been refunded and so on. It's a security feature making it harder for hackers to steal from you by faking paymennts. If you also run an ebay account and you look at your paypal logs in osc you'll see that it tells your site about those payments too!
All of these IPNs trigger the ipn listener in /ext/... if the listener can find a related order it will write a history record that you can see in admin.
Now, sometimes when people pay with paypal they don't come back to your site - maybe they don't wait long enough after hitting pay and rush back to looking at porn or their connection drops or whatever. So if the ipn listener gets notified that the payment is there and the order is in the Preparing status, it will go ahead and complete the order, do the stock adjustments, send the emails and so on. If the order is already in the later status (eg Pending), it will just log the history record.
For the people that do come back to your site and get there before the IPN, when they go through checkout_process that executes the code in the paypal_standard module and changes the order status, stock levels and sends out emails.
So... both files handle setting an order to paid, the stock and so on - but for any given order it was one or the other. If you want to know which it was, you can tell from the history records (if IPN handled it the change of status history is nearly simultaneous with the IPN email).
The IPN listener file always handles processing the IPN notification but it may only write a history if the other got there first
The standard module always handles the user going through checkout_process to checkout_success but it may not do anything for the order if the other got there first
Both routes need to work properly and if you're changing one for some reason you also need to change the other.