Romans actually had seperate buildings that housed the public toilets. Like the baths, though, they were very communal. In Roman society--bathing wasn't a solitary, reflective act like it is often seen as today. It was a a town hall meeting of sorts where you could get the latest news, gossip, and going-ons from around the city. During the winter, the baths could be used as a place to keep warm as well. The baths were an integral part of the social aspect of Roman society, similar to some of the roles taken over by the Medieval Church once bathing fell out of style in the West.
Similarly, the toilets acted in such the same way. They were designed in such a way that you were sitting literally cheek to cheek with the man next to you. Here's a few pictures to illustrate:
http://i3.thejournal.co.uk/incoming/article7908238.ece/ALTERNATES/s615/JS48141384.jpg
http://www.i-claudius.com/Tablinum/files/armadillo/media/romantoilets111025.jpg
You were pretty out of luck if you had a nervous bladder back then. Sanitation wise, the Roman toilets--like their baths--were very much ahead of the time with actual flushing and flowing water. Though, also like the baths, sanitation wasn't exactly a strong suit (Water in roman baths would often not be drained for quite some time and breed some pretty nasty stuff).
And of course, there is an aspect of wealth to account for too. Private and public baths both existed in varying conditions.
I hope that provided at least somewhat of an answer to your question.
There was no hard and fast rule. However, the Romans were very practical people. Both latrines and baths needed water, so it was common for them to be right next to each other or part of the same complex.
One of the most-visited Roman latrines in the world today is probably at Ephesus. Here you can see they were right next to some baths (numbers 39 and 40 on the map).
For a collection of images, check out this page on Following Hadrian. As you can see, many (but not all) of these latrines are part of bath complexes.