Officially a thread is classed as inactive if it hasn't been replied to in a month, or a user within that thread hasn't been active for a month, however you can request a thread to be closed if parties no longer wish to continue it by using the Request an Admin thread which Yooka linked in the post above. When using this, make sure to link the appropriate threads though :)
I don't particularly mind locking threads earlier than the one month deadline but you should definitely have good reasoning for locking it and not just 'this person didn't reply for 2 days' or something like that xDD
Either way though, Yooka is also correct in stating that threads that are locked or classed as inactive don't count towards your character's thread limit, though it's safer to make sure inactive threads are locked for inactivity before you make a new one so mods don't get confused. ^-^