Its a little hard to tell from that picture, but it looks like it might be a t-mount lens.
The t-mount is a system of interchangeable lens mounts that allow a lens to be mounted on many different brands of cameras, by simply replacing the adapter. No camera will accept a t-mount lens without an adapter.
Does your lens have threads at the camera end, that appear to be about the same diameter as M42 threads? The t-mount threads are, in fact, 42mm x 0.75 threads/mm, while M42 is 42mm x 1.0 tpm. A t-mount lens also needs the extra thickness of the adapter to mount it the proper distance from the film/sensor plane.
Whatever you do, DO NOT attempt to force the t-mount lens onto an M42 camera without the proper adapter. It will damage the threads on the camera, the lens or both. It won't focus properly, even if you did force it, because, without the adapter, it will be too close to the sensor plane.
T-mount lenses are all either fully manual aperture control or are "pre-set". In a preset lens, there are two aperture rings. Usually one ring has the usual click-stops for the various settings, while the other ring turns freely and operates the aperture from wide-open down to whatever stop is selected on the other ring.
The good news is that t-mount adapters are still readily available. A good, full-service camera store might even have one. They're plentiful on eBay and usually cost less than $10 US. Adapters are available for M42 (Pentax universal screwmount), Pentax K-mount, Nikon, and so on.
Most adapters have three small set screws around the edge. These can be loosened to allow the lens to be rotated so that the focus and aperture markings are on the top of the lens. Simply mount the lens/adapter, loosen the screws, turn the lens in the adapter until the markings are on top and then tighten the screws.
Here's an example on ebay:
eBay - New & used electronics, cars, apparel, collectibles, sporting goods & more at low prices