The vast majority of repeaters you are likely to encounter are open repeaters that allow anyone to use them. Some of the features may be restricted, such as autopatch (connections to a telephone line), but chatting on the repeater is usually open. If you use a particular repeater frequently, you may want to consider joining an associated club, but you shouldn't see it as an obligation. In many areas, the repeater operator will be happy just to have the repeater used!
There are closed repeaters that are restricted to those authorized by the control operator. Operation of a closed repeater is perfectly legal in the USA according to 47 CFR §97.205(e), which states "Limiting the use of a repeater to only certain user stations is permissible." (IMO, this is contrary to the spirit of Amateur Radio, but it is specifically authorized by FCC.)
Usually, closed repeaters are noted as such in the various online and printed repeater directories. Most likely, you will not be able to use a closed repeater accidentally because they tend to use CTCSS or other access tones that are only given to authorized users. If you do find yourself accidentally using a closed repeater, you will likely be told as much in fairly short order.
For instance, you can see on the FCC's list of recent enforcement actions on June 24, 2013, FCC sent two warning letters threatening fines of up to $10,000 to hams for using a repeater after being asked not to by the repeater operator.
– James NF8I Oct 30 '13 at 15:19