Does the period go inside the parentheses or outside?

That really depends on what else is inside and outside the parentheses. If there is just a parenthetical expression in a sentence, then the period goes outside it. For example, "In addition to the roast, there was a side dish of vegetables (peas and carrots with tiny onions) and a potato casserole." There can also be an entire sentence in parentheses, and in that case, the period goes inside the parentheses. For example, "He insisted that we tell him why this had happened and who was responsible. (No one knew.) He proceeded to make increasingly alarming threats."