Proper bicycle fit is arguably the single most important factor in whether you will enjoy riding your bicycle or not. Yet setting up a bicycle remains an arcane art. This article:
give some pointers on how to setup a tri-bike. Presumably some of the same advice can be used for other bikes as well.
I’m linking a PDF copy of the same article in case the link disappears. However I encourage you to visit their website as they are advertiser supported. Thanks to Angie Ziemann for suggesting the article.