It picks 50 lucky names. Costs vary from race to race. Most people go through a few changes of clothes during the race. However, some people will wear their swimsuit from start to finish, and just throw on a top during the bike and run. The most important thing is to wear what you are comfortable in.
Most competitors change from swimsuit, to bike shorts to running shorts between each leg.
Separate male and female changing tents are provided. You are not required to bring your own food and drink, but it is advisable. While the races provide water, sports drinks, bananas, sports bars, cookies, etc. Check with the Race Director ahead of time, so that you can plan your nutritional needs.