You can't directly merge two partitions. What you need to do is the following:
Check the partition table. The two partitions that you want to 'merge' MUST be adjacent. If not, you can't make them one partition in the way I describe below.
You also need to make sure the first partition uses a filesystem that supports resizing, and that supports what you need it for. (If the first partition is NTFS, as it will be if it holds a Windows 2000 or later installation, you can't use it for Linux).
You need to do everything from a LiveCD. Try the SystemRescueCD.
1) Copy all the data from the second partition. Directly to the first if there is space, otherwise to somewhere else.
2) Delete the second partition.
3) Resize the first partition to make use of the newly freed space.
4) Copy the data that was on the second partition onto the first, if you had to put it somewhere else in step 1.
5) If the partitions were holding an operating system, change your configuration files to reflect the new configuration.
For steps 1 and 4, use the cp command with the -a option. For steps 2 and 3, use parted.