I've already dealt with cracked pipes under the sink several times at home and it's almost always possible to fix it by just replacing that section. The folks are right about the basics, but let me add an important detail: when you cut out the bad part, you remove the two connectors that hold that pipe section in place and then put new ones on. Like, you completely remove the cracked pipe and fit a new one in its place using connectors on both ends.
What a lot of people don't mention is that if the pipe is cracked, it's probably been there for a while and might be fragile in other spots too. So it's worth examining the rest of the plumbing under the sink to see if there aren't other signs of deterioration. If there are one or two more questionable points, it makes sense to replace the whole length, because you don't want to be back there in six months. And about cost, PVC connectors are really cheap (just a few bucks), the pipe is too, so doing this yourself is way cheaper than calling a plumber.
If you're unsure about how to disconnect it, it's pretty straightforward - the connectors come off without much force. But if there's standing water in the pipe, put a bucket underneath before you touch anything so you don't make a mess.