Als is used for a sentence that is in the past, for example 'als ich jünger war...' when I was younger. Wenn is used to mean 'if or when' and often has a conditional sense, for example 'wenn ich mehr Geld hätte', meaning 'if I had more money.' Note that 'als' can have other meaning and can be used in a comparative sense as 'than' or 'as' (for example better than...).