It's likely that you by mistake turned on "loop" on that particular track.
Open the inspector, select the track and/or region that is looped. Make sure loop in the parameters box in the Inspector is unticked.
The default key command is "L" to toggle loop on/off.
to change how long a region loops for: move the cursor to the top right of the original region or one of the loops. The cursor turns in to a rounded arrow. Click, hold and drag to the left or right.
Also, if your region loops to end of project, and you want it to loop to end of say BAR 32. Move your cursor, as above, when it becomes the curved arrow click. The loops beyond that point disappear.
By the way, I think you must be on Logic 8.0.1 - unless you're a good friend of the Logic developers! ;-)