It depends pretty heavily on the planet. Though extremely rare, there are droids out there who don’t have owners and live and work on their own, but the legality of it is not recognized by many worlds. If an unowned droid is found on one of these planets, it will likely be seized, memory-wiped, and sold.
Many galactic laws also treat droids as property rather than people (notably, the Droid Statutes).
On other worlds such as Naboo, however, higher-level droids are considered sentient and are treated as equal. Class three droids, built for interacting with humans and commonly considered the most complex droids out there, are more likely to be seen as personable and granted autonomy than other classes. Class five droids will pretty much never be seen as more than basic labour units, because they are usually built without advanced cognitive modules. This is a simplification, because the whole issue is vastly complicated, but if you have the money I would suggest getting the D6 guide Cynabar’s Fantastic Technology: Droids. It sums it up very nicely, and it’s an interesting read. (If you’d like to message me privately, I can legally send you a few pages of the book, in case you can’t afford it at the moment.)
The legal status of droids on different worlds is usually closely tied to whether the society believes droids can be sentient. I have a whole ton of thoughts on this subject in both Star Wars and the real world (over the last semester I’ve ended up writing three papers on the subject) and I won’t get into depth about my own opinions here, but if you’d like to discuss it further I would be more than happy to. Suffice to say, the galaxy is very divided on this issue, and whether a droid is legally considered “free” will depend on the individual droid and the legal system.
Hope that helps!
~ Jacen