Front squats focus on your quads and ypur upper back more (you need to stay tight or you will have back pain) while back squats train the lower back, glutes and hamstrings more than fronties do.
Back squats are more of an overall exercise than front squats but the best way is to do them both.
About the knees: you will learn how to keep them from going in. I had that problem, after a lot of time it hurt. I tried to push my knees out to the sides and never had knee pain again. (well, not often at least)
210 kg SQ, 135 kg Bench, 260 kg DL
Long Term Goals:
@ 75 kg: SQ - 252,5 kg, SQ w/ Wraps - 282,5 kg, DL - 307,5 kg, Total (w/o Wraps) - 710, Total (w/ Wraps) 712,5 kg
@ 82,5 kg: SQ - 275 kg, SQ w/ Wraps - 277,5 kg, Total (w/ and w/o Wraps) - 772,5 kg
Team Insanity - The Laws of Physics are Merely a Suggestion