When I got a transaction (someone transfer some bitcoins to me), can I use it before the transaction has 6 confirmations?
Yes, you can even spend from transactions which have 0 confirmations (not included in a block yet) if you are willing to. That is the basis for things such as child-pays-for-parent. While it is reasonably low risk to spend from unconfirmed transactions if they are low-value, it is recommended you wait for a few confirmations for larger transactions, because before they are confirmed there is still a risk of a double-spent transaction being included in a block instead, and even after one or two confirmations it is theoretically possible (although very unlikely) for a competing fork to overtake that chain and replace the transaction. See this question for more info about why 6 confirmations is recommended for good safety: Why is 6 the number of confirms that is considered secure?