I suspect that most ICOs are not fully decentralised - that they effectively manage BTC payments / transfers in a Spreadsheet (asking people to create an account, register the address that they will transfer the BTC from etc.).
BTC Relay might help you achieve what you want to do:
Fully decentralized and trustless method of verifying Bitcoin transactions for their Ethereum and smart contract applications.
BTC Relay is a building block for developers that want interoperability between Ethereum and Bitcoin. For example, developers who want to allow their users to pay with Bitcoin to use their Ethereum application.
However, I suspect that you will still require users to create the mapping between the incoming BTC address and the destination ETH address (where the tokens should be sent to).
You can use web3 and Metamask:
Define the web3 variable, this allows you to interact with your contract
var web3 = new Web3(new Web3.providers.HttpProvider("your ethereum node"));
To access the functions of the contract you need the definitions of the functions (ABI)
ABI = "put here your contract ABI"
Then you can create an instance of your contract:
var Contract = web3.eth.contract(ABI);
var contractInstance = Contract.at('address of your contract')
Now you can acces the functions of your contrat, for instance the function join:
contractInstance.join.("the_adress", {from:address, value:web3.toWei("Amount",'ether')},(function(err,result){})
This assumes that the user has an account. Metamask will create the account for you and will keep things safe.
This is just a quick overview of how to do it. I hope it helps.
Best Answer
If the ether is already in the contract and you do not have the functionality to transfer ether already implemented in it, the ether will be forever in the contract.
A simple contract that receives ether and allows for transferring is shown below. Only the person that deploys the contract will be able to transfer the ether.
Hope this helps