Common problem with high mileage YJ's. It has to be bled properly. If you're not too familiar with that have a shop do it to save you a lot of headaches. Depending on what year YJ you have the location will either be fairly easy or a real pia.
depends on which clutch you have some have external slave (very easy) like bleeding brakes some internal (basterd) get help check to make sure your master cylinder isn't leaking very easy to fix look on drivers side fire wall just behind master brake res.