when/if you attach or turn onつけると is the conditional form of つける, meaning “when” or “if” someone attaches, applies, or turns something on. In 気をつけないと, the related expression means “if you’re not careful.”
JA: 電気をつけると、部屋が明るくなります。
EN: When you turn on the light, the room becomes bright.