Avoir la trique is vulgar French slang. Use with extreme caution.
"To have a hard penis" (an erection).
Highly informal / crude. Avoid entirely in polite, professional, or mixed company. It is the direct equivalent of English "have a hard-on" or "be horny."
Bander, avoir une gaule, être en chaleur.