Pellets can be switched over by mixing 1/4 new food to 3/4s old for 1 week, the 1/2 and 1/2 for a week and finally 3/4 new to 1/4 old for 1 week. If the old food is really crappy, you can switch cold turkey. Just sprinkle the pellets with acidophilus to ease the transition.
Hay can just be switched over. If you are switching to alfalfa, though you will need to add a little at a time to prevent the chin from getting diarrhea.