Hi Peace,
Each sentence brings with it a different meaning.
I spend hours to write.
Tense: simple present
Function: a recurring action (eg a habit)
Your hobby is to write and you take hours to do so
I spent hours to write.
Tense:simple past
Function: a past action
At some time in the past, you wrote for hours. It also ended in the past.
Hope this helps.
Cheers,
Lance