How long is the cookie tracked

Im just curious to know how long are affiliate leads tracked for when optin in John’s email list from my traffic. My second question is, is there a training on how to build our own email list to follow up with potential leads?