Each wallet let you choose fees when making transaction, but usually wallet do it automatically manage the fees in transaction that could be confirmed quickly.
Also, don't forget that transaction fee also depends on transaction size (usually about 0.2KB).
What affects transaction size? Number of receiver/sender addresses or number of transactions in the sender address?
How to spend unconfirmed bitcoins?
You can't spend unconfirmed transactions. You have to wait until a certain number of confirmations until you can send them from that point as well.
Transaction size is effected by the input and output scripts needed (in bytes) mainly. If you click on any bitcoin transaction on a block explorer like blockchain.info and click "show scripts & coinbase" then you'll see the input and output scripts required for your transaction to send.
Actually, you can spend your unconfirmed transaction. But, it's very risky that makes some wallet don't allow this. However, you can spend your bitcoin after that transaction have at least 1 confirmation (but some people says it's better wait until it has 2-6 confirmation)
![Roll Eyes](https://bitcointalk.org/Smileys/default/rolleyes.gif)
No, you mean for a web wallet.
In order to do it in the least risky way then you'd have to compare the scripts and save them. Then you'd also have to have your server broadcasting those scripts in the hope that they'll get confirmed before the owner of the address relocates all of their bitcoins somewhere else (why it's risky).
In the main wallets that exist on software, it normally takes over 100 confirmations for a wallet to accept the transaction.
Normally a good minimum for a site to accept is 3 confirmations (3 blocks deep) as the block is unlikely tobe orphaned after that point by the network (but it is still possible technically).