I am flying from Prague through Frankfurt to Toronto. Do I need to go through customs in Frankfurt and will my baggage go directly onto the next plane?
(I didn't manage to find the duplicate, so I'll try to make a summary answer.)
It all depends on two big aspects:
Do you have one ticket (with transfer) or two separate tickets?
To which country do you fly?
If you have one ticket with transfer, then you should get checked in for both flights in Prague. I recommend to arrive the advised 2 hours before departure so that you manage to sort out things nicely. If you get checked in for both flights, then your luggage will make it on its own, and you just move yourself to the correct terminal/gate in Frankfurt. (Check your luggage receipt to ensure it did though! It has to show the code YYZ for Toronto rather than FRA for Frankfurt.) You will pass the passport control (Schengen exit) in Frankfurt (in Prague T2, it's just a brief control and you can even use your ID for that one). It can happen that they don't issue the boarding pass for Frankfurt. Ask the clerk then if the luggage gets checked-in to Toronto or not, and read the next section carefully.
If you have two separate tickets you can still try to get checked in for the flight Frankfurt--Toronto in Prague, but the chances of success are low. (May work if both airlines are in the same alliance, and none of them are low cost carriers, but you'll need to ask nicely at check-in.) Then, you'll have to get your luggage in Frankfurt like if you were terminating there, move (with your luggage) and go the departure terminal at the airport and check-in yourself and your luggage like someone who starts there. Remember that this may take quite some time. This paragraph applies if your luggage wasn't checked in to Toronto in Prague, too.
If your luggage was checked to Toronto in Prague, but your boarding pass wasn't issued (this can happen in very extra-ordinary cases), you just proceed to a transfer desk in Frankfurt, which will issue your boarding pass to Toronto.
If you travel to a country which does a detailed check (USA knows to issue these sometimes, only to change their mind couple minds later, Israel is another such one, and there are surely more, but it all changes every couple months or so), then it can happen that they want to inspect your luggage before loading it on the overseas flight. I would recommend asking for the procedures on the airlines' hotline in advance, they ought to know the procedures.
For the customs: If you have any goods to declare on leaving (like an apparatus worth €1M that you plan to take back home), you better do that in Prague. You should be able to do it in Frankfurt too (since most stuff can travel between CZ and DE without any problem), but it's better to solve this stuff as soon as possible. I better don't give more advice since it's impossible to answer that in general.