The most basic explanation is that you can fast whichever periods you would like (most do 16 hour fasts + 8 hour "feeding windows"), but you must:
A) Lift weights no more than 3 days a week
B) Lift heavy weights to stimulate muscle growth
C) Eat more carbs / less fats on workout days (more calories)
D) Eat more fats / less carbs on "rest" days (less calories)
Compared to most lifestyles (this isn't a diet) this takes a lot of mental preparation and calculation, so it is more daunting initially and less mentally draining as you go on and see results (as compared to a fad diet which is simple to implement but impossible to maintain). It's not easy but, once a routine is established and the learning curve is overcome, many people make the decision to keep the 'LeanGains' lifestyle for the remainder of their lives.