Can I use advance parole to visit Canada or Mexico?
Advance parole lets you return to the US; it is not a visa for Canada or Mexico, so you still need whatever entry document those countries ask for.
Yes for getting back, no for getting in. Advance parole is a document that lets a person with a pending Form I-485 return to the United States after a trip abroad without abandoning the application; it says nothing about whether Canada or Mexico will let you cross their border (8 CFR 212.5). Those countries set their own entry rules, and they look at your passport, not at the U.S. travel document.
What the document does and does not do
The advance parole card, or the older paper Form I-512L, is permission from DHS to be paroled back into the United States. It protects the pending adjustment application from being treated as abandoned. It does not make you a visitor of another country.
What Canada or Mexico requires depends on your passport. Canada asks many travellers for either a visitor visa or an electronic travel authorization; Mexico has its own list of nationalities that need a visa. Having a pending U.S. green card application does not, on its face, change that list. Some countries recognize a valid U.S. visa or a green card as a substitute, which is a different thing from a pending application with advance parole. Readers should read the entry page of the country's own government before booking, and ask the airline, because the airline will check at the counter.
Why people think it works
Land travel to Canada or Mexico is the cheapest, shortest trip a person with a pending case can make, and the idea that advance parole "covers" it is common. It covers the return. The mistake usually shows up at the airport or at the border post, where the other country says no.
Coming back
On return, present the advance parole document with your passport at the port of entry. An officer inspects you and can still ask questions about your case, including criminal history, past status violations or the reason for the trip. Parole is discretionary at the moment of entry. A document in hand is strong evidence that you were authorized to travel, and it is rarely refused, but it is not a promise.
Two details help:
Carry the I-485 receipt notice, the EAD if you hold one, and proof of any job that the case rests on.
If your trip is by land, enter at a port of entry that is open for inspection and tell the officer you are returning under parole. Do not cross anywhere else.
Who can skip it
A person in valid H-1B or L-1 status, and their H-4 or L-2 dependants, can usually return in that status on a valid visa and a current I-797 rather than on advance parole. The Department of State also has an automatic visa revalidation rule for short trips to contiguous territory, which has exceptions by nationality and visa type (22 CFR 41.112). That rule is about nonimmigrant visas, not about advance parole.
If you are unsure which basis you are returning on, or if anything in your history could raise a question at inspection, speak to an immigration attorney before you cross.