Either handwrite it or type it. Either a handwritten or typed letter is totally acceptable. A handwritten letter will have a slightly more personal look, but a typed letter is better if you're more comfortable that way. What matters is the effort you're making to craft a letter and send it, so don't worry too much about your choice here.
If you choose to handwrite it, use a pen with black or blue ink. Write in either print or cursive, as long as your writing is legible.
If you choose to type it, use a font that's easy to read, like Times New Roman or Arial. This is especially necessary if you're writing a thank you letter to a professional colleague.[1]