I've recently purchased a house and am worried there might be mold on the bathroom ceiling. Can anyone identify if that's what these dark blotches are? If it is mold, what's the best way to get rid of it?
Looks like some surface mildew. That's pretty common in a high humidity area like a bathroom. Blot the stains with some equal parts of water and bleach on a rag, followed by blotting with a plain water rag and let it dry. If you still see it, repeat the process. The bleach will kill the mildew and help to remove any staining left behind. If you still have some staining, a temporary fix would be some spray Kilz.
I would consider repainting that ceiling with some mildew-resistant paint.
To me it looks like water leaking on the sheetrock above. If that is a vent fan on the edge of the photo I would want that on a timer that continues for 15 minutes after use (required in my area) this extra time drys the pipe out it could be water leaking from the vent pipe or duct. If it is mold the extra fan time would reduce the humidity in the bathroom also. 3% hydrogen peroxide and water will kill it if it is mold without the bleach smell or bleach and water.