How can you prevent bitcoins from unknown parties being transferred to any of your bitcoin addresses? if so, how? If not, why not?
But you can detect what coins transferred from one address and what coins transferred from another.
Look for example at the first address in the network:
Nobody can stop people to send bitcoins to Satoshi's address, first bitcoin address in the network.
By requiring identity before giving out a Bitcoin address, you can help to reduce the chances that a payment will be made by an unknown party.
Obviously, if you are using a static address, like how many charities do, then you won't know who the party was that sent the funds.
A related topic is the Bitcoin payment protocol (coming in Bitcoin v0.9) that is useful when issuing a payment request. Depending on why you asked your question, that feature might be useful to you.