As the holder of a recreational pilot's certificate, how do I ensure that I don't inadvertently enter airspace where I am required to contact air traffic control?

You must select readily identifiable landmarks that are well beyond the boundaries of the airspace where contact with air traffic control is required. During your training, your instructor will tell you how to identify this kind of airspace.

I already have a recreational pilot's certificate, and I want to get an additional certificate or rating. For training purposes, can I fly beyond the 50-nautical-mile limit, after dark, or in airspace where I have to contact air traffic control?

Yes, if your instructor has given you the required instruction in these areas and has endorsed your pilot's logbook for each flight. You will have to carry the logbook with the required endorsements on these flights.