The main way to prepare for an event is to gradually expose yourself to the type of activity you will be doing.
For example, if you're preparing for a long bike ride then time on the bike will be key. Over time, you gradually want to increase the amount of time or distance you're doing. You will want to build to between 60-75% of the total time or distance you are going to be completing if possible.
Doing strength or other types of training to support this may also be useful, but the priority should always be similar to the event you are doing.
If you are strength training then try to make sure you are working all areas as they will all be relevant (upper body, legs and core).
If you are cross-training then try to make it relevant to the event you are doing. For example, doing 30-second sprints on a bike will have minimal carryover to a 3-hour swim.
Stretching can be useful if you are feeling particularly sore or tight, although this is up to the individual.