No matter how long you have been learning Spanish, this word can be very tricky to understand.
From vulgar Latin derectus (classical Latin directus), ‘right’ ‘direct’, past participle of dirigere, ‘to lead’, which comes from regere, ‘to rule’; and rex, regis. All of them express the idea of a movement along a straight line.
Derecho then can be an adjective, translated into English as ‘straight’ ‘right’, ‘fair’, ‘legitimate’; eg. ésta pared no está derecha, this wall is not straight; la orilla derecha del río, the right bank of the river.
It is also an adverb, meaning ‘straight’ in English, e.g. id derecho al asunto, go straight to the point.
And finally, and here resides the trickiness, it can also be a noun, but with two completely different meanings. It means ‘law’, ‘legislation’, e.g. Juan estudia Derecho, Juan studies law; and it also means ‘prerogative’, ‘rights’, e.g. luchamos por los derechos de los animales, we stand up for animal rights. Lawyers call the first definition derecho objetivo, and it must always be in capital letters, because it is a discipline; and the second one derecho subjetivo. dc