The answer would also rely on the country you're from. For example, in Australia (and I'm sure there would be an equivalent in USA and everywhere else just unsure of the name) there are companies called "payment gateway providers" that provide the pinpad terminals and software/hardware architecture to enable EFT payments in your POS application.
Usually it's better to go through a gateway provider as they should have already done the legwork in being certified as secure with all the major banks and save you that hassle, and also it should be cheaper (theoretically) as you would have economies of scale in terms of transaction processing fees.
Finally as to the architecture, and this is based off the architecture I've used in my POS app, and is fairly typical of most setups is that there's a "server" that acts as a gateway for the store to the banks and it runs a service that enables that communication to occur in a secure manner. Then on each of the registers there's another service, the "client", that's configured to communicate with the in-store server and (ideally) in a secure manner also.
Note that the "server" and "client" may actually be on the same physical computer depending on the size of the store.
The EFT pinpads are connected to the register machine and communicate with the "client".
Where your POS application comes in is via an API that communicates with the pinpad to tell it to perform certain tasks such as:
- Log on to the bank to establish communications for the session/day.
- Check for loss of connectivity from previous sessions.
- Perform a transaction, aka "take $39.95".
- Display prompts, notifications and other feedback from the pinpad/client/server.
- Perform settlements to finalise the transactions for the session.
Plus whatever else your specific payment gateway provider requires of you.
Banks won't let you just plug a pinpad in and just fire zeroes and ones down the line. They will want to know you're legit and aren't going to be ripping your customers off (you could argue that's the bank's job, but you get my gist ;-)
The payment gateway provider is usually your best/quickest bet, I would definitely start there.
Good luck!