it's very simple. There's about 4000 foundations in Thailand, find one that does things you like or passionate about. Then see how you can offer your services and come to an arrangement. It's probably a lot cheaper than the others, but may take more time.
it's all explained in what they put in your passport. I have 12 years of volunteer visas and used to look after 170 volunteers for a foundation so I know a little bit if you need to know more.