SQL Server itself does not have a built-in "infinite timeout" at the server level. Timeout behavior is controlled at the client/tool/application level.
SQL Server Management Studio (SSMS)
Navigate to:
Tools > Options > Query Execution > SQL Server > General
Set Execution time-out to 0
A value of 0 means no timeout (infinite)
Setting timeouts to infinite can be useful for long-running queries, but use with caution to avoid hanging systems or applications.