Copy the code for the original function (the function definition) into a source file, maybe save it as my_func.R if you want to keep it.
Edit the code to make the changes you wish to make. Then re-assign the new code to the function name by running the function definition - I would do this by placing the cursor anywhere within the definition code (safest to have it at the first line I think) and then pressing Ctrl+Enter (in RStudio). This re-defines the function within your current global environment.
The package name thing seems irrelevant here - you can't permanently alter someone else's package directly, but you can copy and extract code from it and edit that (but check the licence of the package). Or you can clone their package and make your own version of it (on github this can be done by forking a repository branch).
Example of a function definition:
# returns the square of the input
my_func <- function(x) {
x^2
}