When buying it takes from your Paypal account first, then your card (so if the cost is £60 and you have a balance of £20 in your Paypal account, it takes that and the balance of £40 from your card). This may be immediately or sometimes is delayed for 15 days on a 'buy now pay later' offer.
When selling the money goes in to the Paypal account, and you transfer it to your bank account via your Paypal account as and when. When selling you pay fees, and these are charged to your Paypal account. If the account is empty, it takes from your card.
If you transfer money as a gift, it is the same as selling, except there are no fees. Hence, often a seller will ask for Payp[al as a gift. But there is no protection in those cases, so be aware of the risks.
Hope this helps. If I have got anything wrong, somebody will say, I am sure.
Kev