Are you asking for a particular reason? Are you just curious or are you facing a specific problem? If you are having a specific issue it may shape some of the answers.
The following method involves the Pen tool. Hope it helps…
- Use the Pen tool to draw a path that includes as many straight and/or curved segments that you like.
- Switch to the Brush tool.
- With the Brush tool active and the path active, select the "Stroke path with brush" button found at the bottom of the Paths panel.
Bonus tip: If you hold down the Alt/Option key while pressing the "Stroke path with brush" button, or you choose "Stroke Path" from the Paths panel menu, a dialog box will open that allows you to "Simulate Pressure" when you stroke the path.