Is your pen not working? Maybe you need to replace it. To replace is to substitute one thing for another — in this case, to get a new pen and throw the old one away.
When you see the word place in it, replace makes sense: replacing is putting something new in place of something old. We need to replace most things at some point: light bulbs burn out and batteries run out, while computers, cars, and socks wear out. When something stops working or is just worn out and old, it might be time to replace it. It's natural to worry that your boss might want to replace you — i.e., fire you and hire someone else. Some things in life cannot be replaced, like a winning lottery ticket or a friend.