Margaret River is about 270 km south of Perth. By car, allow three to three and a half hours via Kwinana Freeway, Forrest Highway, Bussell Highway, and then the road through Busselton. The drive is straightforward, though holiday traffic can slow badly around long weekends.
Coach services connect Perth and Margaret River, usually via Busselton, but they are built for point-to-point travel rather than exploring the region. If you want caves, wineries, and beaches in the same trip, rent a car or join a local tour once you arrive.