"The Third Degree" refers to a long and detailed period of questioning, where pressure and intimidation may be used to get you to tell the truth. It does NOT normally imply torture.
We use this idiom sarcastically when someone is asking us too many questions about something.
If someone is asking you too many questions about something, you can say, "Stop giving me the third degree".