Cylindrical locks are one of the most common types of locks, but can be deceptively complicated to change. If this is the only lock on your apartment door, or if you want actual security, you might consider just leaving it alone and installing a deadbolt above it, since a cylindrical lock provides basically very little resistance to burglary.
Because of the great differences between cylindrical lock cylinders of different manufacturers and even between different product lines of the same manufacturer, it may not be feasible to purchase a replacement cylinder in advance unless you know the exact make and model of the lock. If you do not have a replacement cylinder in advance, you will have to leave the secured space open while you fetch a new cylinder or get the existing one rekeyed, so plan to have someone watch the space while you are gone.
Many manufacturers offer their cylindrical lock installation instructions online. If you identify your cylindrical lock make and model you may be able to find these instructions online.
Above right is shown a cylindrical key-in-knob lock. Below that is the latch face of a cylindrical lock, where you can usually find the brand name. Below this section is an illustration of a cylindrical key-in-lever lock.
To access the cylinder, you will need to remove the outside knob or lever. To do this, you will need a piece of stiff wire and the key to the lock. In the illustration below I have (rather crudely) indicated the location of the all-important poke hole. If you determine that your lock has no poke hole, that means that your lock is either cheap, old, or complicated to disassemble. Your best bet is to replace the whole lock.
If your lock indeed has a poke hole, to remove the outside knob or lever, insert the key and turn it 90 degrees. Depending on the lock function, this action may or may not retract the latch. With the key turned to 90 degrees, insert a piece of stiff wire or other slender, rigid object straight into the poke hole. Beneath the poke hole there is a pin which must be depressed in order to allow the lever or knob to slide off. This process would be easy if you had three hands. To remove the knob or lever, you must pull on the knob or lever while depressing the pin beneath the poke hole and turning the key to the 90 degree position. It should slide off with a small amount of force.
Once you have removed the knob or lever, look inside from the back. The cylinder should be loose inside the knob or lever, or held in by a piece of plastic or sheet metal. Remove whatever is holding it in and remove the cylinder. Now look on the latch face (visible on the edge of the door) for the brand name of the lock. Armed with the brand name of the lock and the cylinder, you should be able to bring the cylinder to a locksmith and either purchase a replacement cylinder or have the locksmith rekey the cylinder as an over the counter transaction.