I have heard that pilots use Controller–Pilot Data Link Communication or ACARS to know which gate (or stand?) they are supposed to be going to but haven't been able to find a definitive answer. Does it vary, or is there a standardized system in commercial aviation?
Yes, it varies
In the US, the ramps where airliners park at major airports typically fall under the airline's control (called non-FAA ramp control). Elsewhere in the world that is not the case, and gate assignment falls under regular ATC (e.g. ground frequency) in coordination with the airport management.
As an example, in such US airport the ATC ground controller will query the pilots if they know their gate and if it's available; if they do and it's available, the controller will send them to where they will enter the ramp that has that gate. Elsewhere, the ground controller will already know where to send them.
So, in one case the pilots get the location from the company, and in the other case from ATC. In the latter case as a nice-to-know the company may have already informed them using data link – this helps the pilots plan/anticipate the runway exit and taxi route especially at complex airports.
Airline relayed parking assignment
When the plane starts its descent, an automatic ACARS AOC in-range report is sent to the airline's operations center, which then uplinks various arrival related information, including the terminal/gate/stand (where applicable) as soon as it's been assigned. When there is very high demand, say due to bad weather and/or holidays, the parking spot may be assigned some time after landing.
Since you've mentioned ACARS and CPDLC: ACARS – when equipped and available can be used for four things:
- AOC (Airline Operational Communications) ← e.g. parking assignment where applicable
- AAC (Airline Administrative Communications)
- APC (Airline Passenger Correspondence)
- ATC (Air Traffic Control communications) ← don't get confused, but this is the original CPDLC: CPDLC using FANS over ACARS, which is different (mostly on a technical/equipment level) from the ATN B1 CPDLC used in Continental Europe – related: What's the relationship between FANS and CPDLC?
For further reading see chapter 4 of the Airbus publication Getting to Grips with Datalink (PDF via cockpitseeker.com).