I never done this before so i have no cluse how it works. SO, if i make somebody to pay online how it works. how do i take money off of their credit cards and how does it go to my account.
can somebody explain please.
For smaller companies this is usually done via a 3rd party service. That is, you link to their site and they handle the card processing via a secure link.
They do charge for this, and sometimes it can be expensive. Often a cheaper alternative is to use PayPal. This works in a similar way.
The onle 3rd party handling company that comes to mind at the moment is Worldpay. I'm sure others will add some others.
BUT how it works in technical terms.
let's say i ask "How this would work technically??"
This Paypal Page can guide you about how to integrate online payment on your website.