Through a special needs trust, you or a family member can leave instructions on how the money in the trust should be managed to ensure that the beneficiary of the trust (your child) continues to qualify for government benefits. You do not have to put money into a trust when you create it (other than a small fee to set it up). A trust can be funded with investments (like stocks), life insurance policies, or other financial sources.
There are different kinds of special needs trusts, and the rules change often. Setting this up through an attorney that specializes in this area is vital as is frequently reviewing the terms of the trust to be sure they still meet federal or state laws and regulations. For some more information on special needs trusts, see this resource from the Special Needs Alliance.