My battery icon has x in it
Most likely the battery has died or is no longer being recognized by the system. To verify it is not the latter Apple has a KB article that will help with resetting the SMC. 

If it is the former it's time to replace the battery. If you are under warranty take it to a nearby Apple store. If not they can still do the repair but it will cost you. Depending on the model you have replacing the battery can be trivially easy (open the latches on the bottom and pop out the battery) to "just give up and cry yourself to sleep."

More info on your make and model would help us determine where your hardware falls in that spectrum and how many cycles you might expect on your battery before it disconnects itself like you have noticed.