Thankfully squash sex bits are large enough that it is fairly easy to hand-pollinate them. This means if you are wanting true-to-type seeds, you aren't limited to one variety of each of the commonly grown Cucurbita species (C. argyrosperma, C. maxima, C. moschata and C. pepo.) I for one find this a blessing; with the wonderful diversity of squashes, there is no way I can only grow four varieties per season! I find using the organza wedding favor bags less fiddly than using close-pins or tape. It is notable that the process is the same for melons and cucumbers though their blossoms are smaller. It is also important to understand that not every attempt is successful, even in nature, so don't be discouraged - just keep trying!
The instructions are available as this downloadable pdf file.