I think the OP is asking about a connection in EWR.
90 minutes is very tight since you will have to clear US immigration, collect your luggage, clear US customs, recheck your luggage, then change terminals from B to A (walking is usually faster if you are in a hurry), then clear security. Immigration and security can both take a long time, depending on the time of day. With Nexus/pre-check and no checked bags, you should make it if your inbound flight is on time. Otherwise, it's hard to say.
They will rebook you on the next United or Air Canada flight if you miss yours. Also, EWR-YYZ flights are frequently delayed, so just because you are late doesn't mean you have missed your connecting flight.