You can download a free Jailhouse Lawyer's Manual - http://www3.law.columbia.edu/hrlr/jlm/ or you can order one from their site.
This type of action is usually used by inmates to secure their rights. The phrase you may have heard is: "violation of civil and constitutional rights under color of law or authority". And it is commonly referred to as a Chapter 1983 action.