There isn't a huge demand for typewriters nowadays and they ceased production in the UK in 2012, according The Guardian. As for donating one, it will be of little interest to anyone if it is broken. However, it seems a shame to throw away a working typewriter. Further, it is better for the environment to recycle items where possible.
Search online for charity shops in your area. Check their “goods we accept” section -- or similar -- to find out whether they want typewriters. Oxfam, for example, does not specifically mention typewriters in its list of wanted items. If the typewriter is an electric one, be aware that not all charity shops will accept it. However, if you believe the typewriter will sell, a charity shop is likely to want it.
Contact a local charity shop and ask them if they want the typewriter. Describe the typewriter to them. State whether it is a manual or electric model. Mention its age and condition. Describe any special features, such as error-correction capability. If the shop agrees to accept the typewriter, take it there as soon as possible. Ring another charity shop if the first one says no to the typewriter.
Advertise the typewriter on a free classified advertisements site, if no charity shops in your area want the typewriter. Set up an account -- if you do not already have one -- and place an ad. Describe the typewriter and add a picture or two, if possible. State that the item is for collection only, so you do not have to go to the expense of posting or delivering it. Place an advertisement card in your local post office or other local shop at the same time.
Check whether your council has a shop at any of its recycling facilities, if there are no responses to your online and postcard ads. Norfolk County Council, for example, has several Reuse Shops.Take the typewriter to the recycling centre shop to see whether they will accept it. If not, place it in the correct recycling skip. At least its materials will be reprocessed.