I'm not absolutely certain that this information is completely correct, but these are the answers to your questions to the best of my knowledge:
(The following assumes your country has higher prestige than the country you're attempting to gain control of via Personal Union):
When the ruler of a country who is not of your monarch's dynasty dies without an heir, and you have a royal marriage with that country, a member of your dynasty other than yourself takes the throne. If the ruler of the country with which you have a royal marriage already belongs to the same dynasty as your ruler, if that ruler has no heir or the heir only has a weak claim, you can use the "Claim Throne" option under diplomatic actions on that country's diplomacy screen to assert your right to the throne should the monarch die in that situation. If you are the only claimant to the throne and that ruler dies, you will peacefully inherit the country and become the senior partner in a personal union with it. If there are other claimants, a succession war will begin.