A trellis can be used to train beans, pumpkin, watermelon and squash or anything that has a vine. This is how I do my trellis for cucumber and beans. I would not use this type of trellis for watermelon or pumpkin as they are too heavy for this type of trellis.
Start with tall wooden stakes, I bought these from Fred Meyer for less than a $1 a piece. I used 3 but you should really have at least 4 to 6 for the space I did.
You will also need some twine, I used Jute twine because it was .89 cents each roll and had a cutter at the end which made my life easier. Stake each wooden stake in a single file line evenly spaced. Then once you are sure they are secure start wrapping twine in horizontal lines like the picture below.
Once you have them evenly spaced start adding vertical lines of twine. Make sure to overlap the twine on each vertical line like the next picture.
As you train your vegetables up the trellis you may need to cut leaves and manually attach any vines to trellis. As the plant grows it will attach itself to the trellis and climb.