Welcome to Just Answer.
Lamp cord has a ribbed side and a smooth side. The ribbed wire is connected to your white (neutral) wire. The smooth wire is connected to the black (hot) wire.
If you need further help or clarification on this answer, please do not hesitate to reply to this post.
Thanks for asking your question at Just Answer.
Best of Luck, Brian
Please leave feedback at your convenience.
Is the red connected to the switch?
Did this used to be a setup for a ceiling fan?
Assuming this was a setup for a ceiling fan, you will need to connect the smooth lamp wire to the red ceiling wire. Connect the ribbed lamp wire to the white ceiling wire and cap the black ceiling wire securely with a wire nut.
If the black wire is connected to switch, then connect everything as stated above, but use the black wire instead of the red. Just cap the red wire at each end with wire nuts.