Never lose sight of your bike in a public place unless it is locked; it may get stolen. Use a lock you can pass around an immovable object and then through the bike frame and the front wheel. (If the front wheel has a quick-release mechanism, remove the ‘wheel and pass the lock through both wheels.)
Ideally, use a 9-inch, U-shaped, vinyl clad shackle of through-hardened metal with a built-in tubular lock. It resists bolt cutters, is hard to pick, and may come with theft insurance.
Less secure but lighter, cheaper, and easier to fasten around trees or thick posts is a 6-foot coil of plastic coated steel cable with loops at both ends or a chain with 3/8-inch hardened steel links. These should be held by a 4-tumbler key lock with a heat treated 3/4 inch steel shackle.