You can write of a minimum of $3,000 of the loss in the year is was sustained. The balance you can carry over to future years.
You can write a capital loss off against capital gains, and if you have a net loss, you can deduct that against ordinary income up to $3,000 per year. Any unused loss can be carried over to the next year until you use it all up.