In everyday usage, they refer to the same thing, but technically they refer to different things.
Toilet is the actual equipment you use to "do your business" (i.e., to urinate or defecate).
Bathroom literally means the whole room, in which there is a toilet, a bathtub, and a sink.
Restroom is generally used for public spaces (such as restrooms in a restaurant or a rest stop along the freeway.)
However, because as human beings we tend not to like to talk about our bodily functions, we generally use euphemisms so that we don't have to say "urinate" or "defecate" directly, especially in polite company. That is why we usually say "I have to go to the bathroom," or "I have to go to the restroom," and slightly less often, "I have to use the toilet."