(I assume you mean after a certain amount of time with no activity)
`slock` doesn't have that capability built-in; you have to use another tool that watches X and tracks how long there's been no activity. For example, using xautolock with a delay of 15 minutes:
$ xautolock -time 15 -locker slock