I'm new to electric guitar playing myself, but what I have found out is that there is no one answer to this.
There is many factors contributing to a single sound. First there is the type or brand of guitar. Secondly (often most importantly) there is the type of pick-up (single coil or humbucking - both sound very differently). And then you have different brands and makes of pick-ups for each of these. Thirdly, additional effects will distort the sound. Some of these effects can come with the amp (like mine, Boss Katana 50), if not you'll need pedals.
I have tried playing the riff in Californication, and I mimicked the sound by using a fairly clean setting (with some extra gain) on the humbucking pick-up of my stratocaster HSS. The exact settings on the other controls will vary from amp to amp. Like I said, there's many roads that lead to Rome.
As a final comment I'd say that it is fairly hopeless to try and mimick any sound on any song from any band. You'd need tons of extra equipment, and more than a few guitars. I bought a stratocaster with 2 single coil and 1 humbucking pickup, because, after long reasearch and talks with the shop owner, I came to the decision that this guitar is extremely versatile and not overly expensive. For me, as a beginner, that was very important.