I just replaced the crankset on my Trek with a
Shimano Alivio crank for super cheap, $40 but it didn't come with a new BB like the Deore M590 previously suggested.
The crank arms will likely be bolted to the BB spindle by either a 8mm Allen head bolt or a 14 or 15mm hex head bolt. You'll then need a crank puller like the
Park CWP-7 to pull the crank off the BB and a bottom bracket tool if you're going to replace that as well. There are
several different tools for bottom brackets, so have a look at yours and determine which tool fits your BB.
ALSO, this was something that I nearly screwed up on. Make sure that the new BB spindle length matches your current spindle length (I believe that's also referred to as BB width). It probably will be very close if not the same, but changing the spindle length moves the crankset off-center from the cassette, so it's definitely something to be aware of.
I ordered that crankset without even checking the recommended BB spindle length on it but was lucky to find according to
this document that the recommended spindle length matched what my bike already had. I couldn't find the M590 or M591 on it, so there must be an updated document like it available somewhere with that crankset listed.