If you are not logged in on the Peertube instance where you are watching the video, you will automatically join the chat.You will be assigned a random nickname (something like "Anonymous 12345").
The Peertube instance can configure external authentication providers (Mastodon accounts, Google accounts, ...).In such case, you will see a "{{% livechat_label login_using_external_account %}}" button, that will open a dialog modal.In this dialog modal, there will be some buttons to connect using a remote account.