When you take the official TOEFL test, you get one copy of your score mailed to you, and you can have it sent up to 4 institutions at no additional cost (it's included in your registration fee). You can have your score results sent to more institutions at an additional cost of US$20 each. See ETS for more details.
In order to have your score sent to an institution, you need the code for that school. For example, MIT's is 3514. You can find the code by either going the web page of the school, or search through the Destination Directory PDF at ETS. PBT scores are mailed out ~5 weeks after taken the test. For the IBT, your score will be viewable online less than 2 weeks after you have taken the test. Your scores will also be sent out (from ETS which is based in New Jersey, USA) in the mail close to 2 weeks after completing the test. How long before you receive your score will depend on where you live.
So how is the TOEFL IBT scored? The Reading and Listening sections are marked electronically (by computer). All multiple choice questions are worth one point. But some of the questions are worth more than one point. The directions will always tell you the value of the question if it is worth more than one point. There are more than 30 questions in each of the Reading and Listening sections, yet the maximum score for each is 30. How can that be? ETS uses some "magic" (how it's done is kept secret) to create it's scaled score. A high score in Reading and Listening is 22-30.
The Speaking and Writing sections are scored differently. These 2 sections are marked by trained graders following strict rules to guarantee consistency. Each of the 4 Speaking questions has a maximum value of 4 which is then scaled to a score out of 30. Each of the 2 Writing questions has a maximum value of 5 which is then scaled to a score out of 30. A high score for Speaking is 26-30 and 24-30 for Writing.
This table shows the scaled scores for each of the PBT, CBT and IBT tests:
Source: ETS page for June 2017 onwards version of the PBT
In the original PBT, you also write one essay, called the Test of Written English (TWE). It was scored separately on a scale of 0 to 6. The essay score is NOT part of the PBT score.
Source: Original 2005 ETS PDF, page 5.
There isn't a simple way to convert the scores from one kind of the TOEFL test to another because the structure – types and number of questions – is different. However, ETS does have a table comparing total scores. See pages 6 and 7 of their PDF. On pages 8-10 you can find score comparisons for the Reading, Listening and Writing sections. There's no comparison for Speaking since it only exists in the IBT.
Scores are valid for 2 years. Since the CBT hasn't been offered since 2005, any CBT score will no longer be valid.
For the IBT, ETS has a PDF file covering score ranges from low to high in each section, giving details on what your skills are and how you can improve your weaknesses.
If you want an idea of how good your score is compared to others from your country or other countries, ETS does publish detailed reports. A PDF of the detailed report for 2017 can be found here.