Thailand uses 230V, 50Hz with sockets and plugs Type A, Type B, Type C and Type F.
Some sockets/plugs in Thailand are the same as in Spain while for others you will need an adapter. You can buy one from Amazon which supports wide variety of sockets/plugs, not just the ones for Thailand.
Frequency is the same in Thailand and Spain (50 Hz) so there shouldn't be any problems.
Thailand also uses 230V as Spain so you don't need a converter/transformer to convert a voltage as it's the same.