In the immortal words of Beyonce, you shouldn’t ever for a second get to thinking you’re irreplaceable. She has a point; thinking you’re irreplaceable leads to you becoming complacent, and your actions, once you think you’re the best thing ever, can lead to your doom, whether it’s a job or a relationship. Then again, that song did come out ten years ago and things have changed since then, such as the fact that you can make yourself irreplaceable to your employer... at least temporarily. It might be risky to think of yourself in terms of "irreplaceable", but you can definitely make yourself "less replaceable".
If your working life consists of sitting in the office from 9 to 5, watching the clock and making no extra effort, then you’re probably pretty replaceable - or it’s possible that 9 to 5 just isn’t for you. Irreplaceable people gain that status by answering "what would the company look like if they hired someone better than you?" with a cocky "there is no one better than me." There probably is, somewhere, but they’ve taken steps to make sure that there aren’t many of them out there.
What do those people do to make themselves less replaceable? These things, for a start: