Its a Huffy i got it last year, all of a sudden my chain keeps popping when i peddle up hills and sometimes going down.

Do i have to replace the chain? or can i do something to prevent it.