
Rooster says "get your act together!"
Whether we're talking about road, mountain, or cross, it's always an asset to have as much info as possible on the course on which you're going to race. For a lot of road courses, it's pretty easy to get a fair idea of the layout from your computer. Strava, Google Maps, and promoter-provided course maps and cue sheets can all be part of your pre-race intel. If possible, the gold standard is to ride critical sections of the course, especially if there are big climbs. You don't want to lay out some blistering attack thinking it's false flat to the finish only to "discover" a 500 meter 20% switchback section. Conversely, you don't want to save energy on the "second to last climb," thinking that the lead group will reconsolidate before that "last climb," only to find out that you're already ON the "last climb" (don't ask me how I know this). In any case, a piece of white tape on your top tube with significant cues, feed zones, KOMs, sprint points, and simple climb info can be a huge help. You'll just want to be sure to start the trip odometer on your computer at the start line so things line up.
For a crit, you'll want to get to the course and be ready to ride before the race before yours. As soon as the officials open the course, get on it, check out the lines, make note of any potholes or grates or manhole covers, how the wind is moving over the course, and anything else that seems significant to you. I often find it helpful to walk around the course while other fields are racing and see how they are doing things in various sections.
In mountain biking, pre-rides are key. A lot of courses stay much the same year to year so over time you will build up not only info on how the course goes, but how it rides in different conditions. For a new course, often your only option is to show up a day early, or to hit a pre-planned pre-ride (some courses are on private land and can only be ridden at approved times). The typical mountain bike race will have waves on course throughout the day and you can't get on on race day. Knowing the course well is a huge advantage in a mountain bike race.
Cross races are sort of the opposite of mountain bike races, logistically, and are much more like crit pre-rides. Often, the course isn't set up long enough before hand to allow you to pre-ride it before race day. Also, courses get tweaked year to year. If there are memorable specific features of a course and you know they will be included, it's fairly easy to replicate them of site, so do that. On race day, you want to get to the venue with at least enough time to ride the course when they open it after the race that's two races ahead of yours. You want to be somewhat warmed up and ready to roll about 20 minutes before the race before yours, and as soon as the officials let you on course (which is usually while the race in progress is still going, but PLEASE do not interfere with any riders still racing), get out there.
In crits, mountain and cross races, not only does pre-riding give you a heads up as to where you need to spend energy and where you can save it like on a road course, it will give you a big feel for how to set up various sections. You can also make any adjustments to tire pressure or other setup bits and know that you're going into the race as ready as you can be.